spinning star

Andrew Thomson ajthomson at optushome.com.au
Tue May 27 01:26:04 EDT 2003


thanks, 

that's awesome.

ajt.

On Tue, May 27, 2003 at 12:20:01AM -0500, Ian Bicking wrote:
> On Tue, 2003-05-27 at 00:06, Andrew Thomson wrote:
> > not really mission critical here, but what would approach would one take
> > to create a spinning star!.. ie, -\|/- etc etc..
> 
> Writing chr(13) does the trick, like:
> 
> 
> chars = "/-\\|"
> total = 10000
> for i in range(total):
>     sys.stdout.write(chr(13))
>     sys.stdout.write('%s %i/%i     ' % (chars[i % 4], i, total))
>     sys.stdout.flush()
>     time.sleep(0.1)
> 
> -- 
> Ian Bicking   ianb at colorstudy.com  http://colorstudy.com
> PGP:  gpg --keyserver pgp.mit.edu --recv-keys 0x9B9E28B7
> 4869 N. Talman Ave., Chicago, IL 60625      773-275-7241
> 
> 






More information about the Python-list mailing list