goto, cls, wait commands
Grant Edwards
grante at visi.com
Thu Feb 10 11:21:06 EST 2005
On 2005-02-10, BOOGIEMAN <BOOGIEMANPN at YAHOO.COM> wrote:
> First of all, what's Python command equivalent to QBasic's "goto" ?
There isn't one.
One defines functions and calls them. One uses for and while
loops. One uses list comprehensions. One uses if/elif/else.
> Secondly, how do I clear screen (cls) from text and other content ?
That depends on the host system. Under Unix, you can do
os.system('clear'). Or you can use ncurses. Or you can use
os.system to run the 'tput' command with appropriate parameters
-- see the tput man page.
There's probably some way to do it in Windows as well, but I
don't do windows.
> And last, how do I put program to wait certain amount of
> seconds ?
time.sleep(1) will wait for 1 second.
time.sleep(5.5) will wait for 5.5 seconds.
--
Grant Edwards grante Yow! Yow! I like my new
at DENTIST...
visi.com
More information about the Python-list
mailing list