[Tutor] Linear programming - is it bad?
Eric Belanger
bilange at gamebox.net
Tue Aug 10 17:57:20 CEST 2004
Hi,
Thanks for all the replies. Also, thank you (Danny) for pointing out
redundancy in my code. I made this script a bit quickly without thinking
about optimizing, to tell the truth.
Also, while we're in this exact subject, we could use getch in a function:
###
from msvcrt import getch
def wait_keystroke(sz_display = ""):
if sz_display != "":
print sz_display
key = getch()
while not key:
key = getch()
return key
key_pressed = wait_keystroke("Press any key to continue...")
print "You pressed: " + key_pressed
###
Thanks again for your input!
Eric Belanger
More information about the Tutor
mailing list