Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42837

Re: Typing letters slowly using sys

From inq1ltd <inq1ltd@inqvista.com>
Subject Re: Typing letters slowly using sys
Date 2013-04-05 11:39 -0400
References <44fa9565-c6cd-4a46-ad28-97417b403444@googlegroups.com> <b7680abc-4566-4aad-9426-9d80881899bd@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.148.1365178558.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Friday, April 05, 2013 08:10:53 AM Matt wrote:
> On Friday, April 5, 2013 10:04:49 AM UTC-4, Matt wrote:
> > I am using sys to give the effect that I am typing letters slowly.
> > Basically what I want to have happen is have it show "Loading......"
> > with the word loading appearing instantly and then the periods
> > appearing slowly, as most loading screens do.
> > 
> > This is what I have.
> > 
> > 
> > 
> > dots = ('............')
> > 
> > for x in dots:
> >      sys.stdout.write(x)
> >      
> >      sys.stdout.flush()
> >      
> >      time.sleep(0.2)
> > 
> > I cannot for the life of me figure out how to get the dots to appear on
> > the same line as "Loading". Every way that I have attempted, the word
> > "Loading" appears and then the dots appear on the next line.
> Sorry guys, I may have not been clear. The part I pasted does work, but I
> cannot figure out how to get that to print after the word "Loading". So it
> will instantly print "Loading", and then the "..........." will appear
> slowly

if you can write the dots on one one line, then try writing the word 
with an additional dot.
Loading .
Loading . .
Loading . . . 

in other words, over write the word Loading with one
additional dot each time a dot is called for.  

jd
inqvista.com







Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Typing letters slowly using sys mattgraves7@gmail.com - 2013-04-05 07:04 -0700
  Re: Typing letters slowly using sys John Gordon <gordon@panix.com> - 2013-04-05 14:31 +0000
  Re: Typing letters slowly using sys Grant Edwards <invalid@invalid.invalid> - 2013-04-05 14:50 +0000
  Re: Typing letters slowly using sys Mitya Sirenef <msirenef@lightbird.net> - 2013-04-05 10:52 -0400
  Re: Typing letters slowly using sys Matt <mattgraves7@gmail.com> - 2013-04-05 08:10 -0700
    Re: Typing letters slowly using sys John Gordon <gordon@panix.com> - 2013-04-05 15:14 +0000
    Re: Typing letters slowly using sys inq1ltd <inq1ltd@inqvista.com> - 2013-04-05 11:39 -0400

csiph-web