单线打印点 [英] Printing dots in single-line

查看:116
本文介绍了单线打印点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿那里,


我想在程序加载时打印一些点,或者确实是b
。我尝试跟随他,但它没有工作:(。


而1:

print''。'',


打印由空格分隔的点线(...等)。是否有一个

的方式我可以让它显示它们而没有那个空格(。 ......等等)


谢谢

解决方案

2003年11月13日星期四12 :22:01 -0300,< tr **** @ nic.nac.wdyn.de>写道:

嘿那里,

我想要在我的程序加载或做某事的时候用单行打印一些点。我试着跟随但是它没有工作:(。

而1: print''。'',

打印由空格分隔的点线(...等)。有没有一种方法我可以让它显示它们而不用白色空间(.......等)?




导入系统

而1:

sys.stdout.write("。")


< blockquote>在11/13/2003 AM 08:22, tr **** @ nic.nac.wdyn.de 写道:

嘿那里,

我想在我的程序加载或做某事的时候用单行打印一些点。我尝试跟随他,但它没有工作:(。

而1:
打印'''',

打印出的点线分开通过空格(......等)。是否有一种方法可以让它显示它们而没有那个空白区域(.......等)?



尝试(取决于输出设备)

而1:

print''.\ b'',


Bob Gailer
bg ***** @ alum.rpi.edu

303 442 2625

---

外出邮件已通过无病毒验证。

由AVG反查病毒系统( http://www.grisoft.com)

版本:6.0.538 /病毒库:333 - 发布日期:11/10/2003


Bob Gailer写道:

2003年11月13日上午8点22分, tr****@nic.nac .wdyn.de 写道:

打印由空格分隔的点线(。 。 。 。 。 。等等)。有没有这样的方式我可以让它显示它们没有那个白色空间
(.......等)?



尝试(取决于输出设备)
1:
print''.\'',




_far_ superior解决方案将首先不要打印尾随

空格:


而True:

sys.stdout.write( ''。'')

sys.stdout.flush()


-

Erik Max Francis&& ma*@alcyone.com && http://www.alcyone.com/max/

__美国加利福尼亚州圣何塞市&& 37 20 N 121 53 W&& & tSftDotIotE

/ \

\ __ /爱就像战争:容易开始但很难停止。

- HL Mencken


Hey there,

I want to print some dots in a single-line while my program loads or does
something. I tried with he following but it didn''t work :(.

while 1:
print ''.'',

Prints line of dots separated by a whitespace (. . . . . . etc). Is there a
way I can get it to display them without that white space (.......etc)?

Thanks

解决方案

On Thu, 13 Nov 2003 12:22:01 -0300, <tr****@nic.nac.wdyn.de> wrote:

Hey there,

I want to print some dots in a single-line while my program loads or does
something. I tried with he following but it didn''t work :(.

while 1:
print ''.'',

Prints line of dots separated by a whitespace (. . . . . . etc). Is there a
way I can get it to display them without that white space (.......etc)?



import sys

while 1:
sys.stdout.write(".")


At 08:22 AM 11/13/2003, tr****@nic.nac.wdyn.de wrote:

Hey there,

I want to print some dots in a single-line while my program loads or does
something. I tried with he following but it didn''t work :(.

while 1:
print ''.'',

Prints line of dots separated by a whitespace (. . . . . . etc). Is there a
way I can get it to display them without that white space (.......etc)?



Try (depending on the output device)
while 1:
print ''.\b'',

Bob Gailer
bg*****@alum.rpi.edu
303 442 2625
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.538 / Virus Database: 333 - Release Date: 11/10/2003


Bob Gailer wrote:

At 08:22 AM 11/13/2003, tr****@nic.nac.wdyn.de wrote:

Prints line of dots separated by a whitespace (. . . . . . etc). Is
there a
way I can get it to display them without that white space
(.......etc)?



Try (depending on the output device)
while 1:
print ''.\b'',



A _far_ superior solution would be to simply not print the trailing
spaces in the first place:

while True:
sys.stdout.write(''.'')
sys.stdout.flush()

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \
\__/ Love is like war: easy to begin but very hard to stop.
-- H.L. Mencken


这篇关于单线打印点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆