尝试(取决于输出设备) 而1: print''.\ b'', Bob Gailer bg ***** @ alum.rpi.edu 303 442 2625 --- 外出邮件已通过无病毒验证。 由AVG反查病毒系统( http://www.grisoft.com)。 版本:6.0.538 /病毒库:333 - 发布日期:11/10/2003 尝试(取决于输出设备) 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 doessomething. I tried with he following but it didn''t work :(.while 1:print ''.'',Prints line of dots separated by a whitespace (. . . . . . etc). Is there away I can get it to display them without that white space (.......etc)?Thanks 解决方案import syswhile 1:sys.stdout.write(".")Try (depending on the output device)while 1:print ''.\b'',Bob Gailer bg*****@alum.rpi.edu303 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 Try (depending on the output device) while 1: print ''.\b'',A _far_ superior solution would be to simply not print the trailingspaces 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 这篇关于单线打印点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 19:00