You are not logged in.
Pages: 1
I want to add a 'typing effect' to my program. You know... a cursor blinking, printing letters one by one... I want it to look like the program is typing.
Like it's shown on this .gif, but in english, of course.
Anyways, is there a simple way of achieving this? I'm trying not to mess with curses, because it always screws the terminal leaving me no choice but to close it. (I got to read the curses docs one day...)
Last edited by Boris Bolgradov (2008-10-25 11:02:18)
Offline
Anyone?
Offline
for a in 'ububuu':
sys.stdout.write(a)
sys.stdout.flush()
time.sleep(1)
(why does damned python insist on putting newline (or space, with trailing ,) after strings?)
Offline
Thanks!
Last edited by Boris Bolgradov (2008-10-25 12:47:24)
Offline
(why does damned python insist on putting newline (or space, with trailing ,) after strings?)
You'll be glad when py3k is the de facto release then, because you may decide to remove the newline/space within the print - function. Yep, it's a function now.
div curl F = 0
Offline
Pages: 1