Erik Bethke wrote:
At least I thought this was funny and cool! -Erik
Thanks. ;)
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
Secondly, how do I clear screen (cls) from text and other content ?
That depends on
A: What type of display device you're using
B: What type of interface is being rendered on that display (command
line, GUI, IDE, etc)
C: Perhaps what operating system you are using.
D:
You sir are a troll for sure. QBasic?! When was the last time you did
any programming, 1989? Gave me a laugh though.
Lars
--
http://mail.python.org/mailman/listinfo/python-list
jean-michel [EMAIL PROTECTED] wrote:
And it was not possible to remove GOTO, because that would really need
to rewrite manually the programs
really? converting GOTO messes to structured programs has been a solved
problem for many years (you can buy commercial products that does this, and
I
Alan Kennedy [EMAIL PROTECTED] writes:
Secondly, how do I clear screen (cls) from text and other content ?
That depends on
A: What type of display device you're using
B: What type of interface is being rendered on that display (command
line, GUI, IDE, etc)
C: Perhaps what operating system
Harlin wrote:
No goto needed. If this makes no sense (which it may not if all
you've
been exposed to is BASIC) it wouldn't be a bad idea to Google why you
should never use a goto statement.
GOTO isn't even needed in QBasic (except for ON ERROR GOTO).
--
BOOGIEMAN [EMAIL PROTECTED] a écrit dans le message de
news:[EMAIL PROTECTED]
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
?
Grant Edwards [EMAIL PROTECTED] wrote:
I forgot to mention try/except. When I do use goto in C
programming it's almost always to impliment what would have
been a try/except block in Python.
Yes I'd agree with that. No more 'goto out'.
There is this also
for (i = 0; ...)
{
jean-michel wrote:
Hi all,
I saw a lot of comments saying GOTO is not usefull, very bad, and we
should'nt use it because we don't need it.
I think that's true, but only if you *create* programs.
But if the goal is to provide some kind of converter to automatically take
an old application written
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 ?
Secondly, how do I clear screen (cls) from text and other content ?
And last, how do I
BOOGIEMAN a écrit :
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 ?
I had a professor that told me that using goto in prog is that
BOOGIEMAN wrote:
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 ?
There isn't one. Why do you think you need this?
Secondly, how
On Thu, 10 Feb 2005 16:59:04 +0100, rumours say that BOOGIEMAN
[EMAIL PROTECTED] 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
On 2005-02-10, BOOGIEMAN [EMAIL PROTECTED] 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
[BOOGIEMAN]
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 ?
Oh no! You said the G word! That's a dirty word in computer science
Duncan Booth a écrit :
BOOGIEMAN wrote:
(snip)
Secondly, how do I clear screen (cls) from text and other
content ?
That depends on your computer, and how you are running your program.
One way which *might* work is:
import os
os.system(cls)
*might* work... !-)
[EMAIL PROTECTED] modulix $ cls
Grant Edwards a écrit :
On 2005-02-10, BOOGIEMAN [EMAIL PROTECTED] 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.
and even
On 2005-02-10, Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Grant Edwards a écrit :
On 2005-02-10, BOOGIEMAN [EMAIL PROTECTED] 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
Bruno Desthuilliers wrote:
Duncan Booth a écrit :
BOOGIEMAN wrote:
Secondly, how do I clear screen (cls) from text and other
content ?
That depends on your computer, and how you are running your program.
One way which *might* work is:
import os
os.system(cls)
*might* work... !-)
[EMAIL
import os
if os.name == nt:
os.system(cls) # Works in w2k
else:
os.system(clear)# Works in cygwin's Bash
Ulf Göransson wrote:
Bruno Desthuilliers wrote:
Duncan Booth a écrit :
BOOGIEMAN wrote:
Secondly, how do I clear screen (cls) from text and other
content ?
OK, thanks all
Here's presentation of my advanced programming skills :)
import os
import time
os.system(cls)
number = 78
guess = 0
while guess != number:
guess = input(Guess number: )
if guess number:
print Lower
BOOGIEMAN said unto the world upon 2005-02-10 16:06:
OK, thanks all
Here's presentation of my advanced programming skills :)
import os
import time
os.system(cls)
number = 78
guess = 0
while guess != number:
guess = input(Guess number: )
if
No goto needed. If this makes no sense (which it may not if all you've
been exposed to is BASIC) it wouldn't be a bad idea to Google why you
should never use a goto statement.
To do a clear screen you'll need to use the method that your command
shell uses. The shortcut to this is for Windows,
BOOGIEMAN wrote:
First of all, what's Python command equivalent to QBasic's goto ?
You can only use the goto function if you use Python with line numbers,
thusly:
10 import sys
20 real_stdout = sys.stdout
30 class fake_stdout(object): pass
40 fake_stdout.write = lambda x, y: None
50 sys.stdout =
On Windows, I use WConio
http://newcenturycomputers.net/projects/wconio.html
It provides other screen functions you might have gotten used to in
QBasic as well.
On unix/cygwin, use curses.
I am not aware of any portable library though.
I used to use cls a lot in my QBasic days. Now I just
25 matches
Mail list logo