goto, cls, wait commands

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Thu Feb 10 11:18:36 EST 2005


On Thu, 10 Feb 2005 16:59:04 +0100, rumours say that BOOGIEMAN
<BOOGIEMANPN at YAHOO.COM> might have written:

Best advice: try to forget QBasic, and try again reading the tutorial.  That, if
your post is serious.  If it isn't, keep reading my reply :)

>I've just finished reading Python turtorial for non-programmers
>and I haven't found there anything about some usefull commands I used in
>QBasic. First of all, what's Python command equivalent to QBasic's "goto" ?

goto for python:

http://entrian.com/goto/index.html

Please ignore the line in bold red.

>Secondly, how do I clear screen (cls) from text and other content ?

Python clears after itself, so you don't need to.  If you insist though,

.>> import os
.>> os.system('cls')

That on a windows "console".

If on IDLE, try closing the window and reopening it.

>And last, how do I put program to wait certain amount of seconds ?
>If I remeber correctly I used to type "Wait 10" and QBasic waits 
>10 seconds before proceeding to next command.

(A serious answer for a change)  Waiting is time related.  So import time and
call the time.sleep function.

Try entering help at a Python prompt.
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list