Re: Noob Question: Force input to be int?

2007-01-24 Thread consmash
On 23 Sty, 10:59, [EMAIL PROTECTED] wrote: Hello everyone! I have a piece of code that looks like this: if len(BuildList) 0: print The script found %d game directories: % len(BuildList) print num = 0 for i in BuildList: print str(num) ++ i num =

Noob Question: Force input to be int?

2007-01-23 Thread wd . jonsson
Hello everyone! I have a piece of code that looks like this: if len(BuildList) 0: print The script found %d game directories: % len(BuildList) print num = 0 for i in BuildList: print str(num) ++ i num = num + 1 print print Select a build number

Re: Noob Question: Force input to be int?

2007-01-23 Thread Daniel Nogradi
I have a piece of code that looks like this: if len(BuildList) 0: print The script found %d game directories: % len(BuildList) print num = 0 for i in BuildList: print str(num) ++ i num = num + 1 print print Select a build number from 0 to

Re: Noob Question: Force input to be int?

2007-01-23 Thread Paul Rubin
[EMAIL PROTECTED] writes: print Select a build number from 0 to + str(len(BuildList) - 1) buildNum = int(raw_input('Select build # ')) while buildNum (len(BuildList) -1) or buildNum = -1: print print Error: Invalid build number! print Select a build

Re: Noob Question: Force input to be int?

2007-01-23 Thread Daniel Jonsson
Ah, thank you for the respone! I have not gotten around to test it yet, but I hope it will work! :) -Daniel 2007-01-23 10:59:37 [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED] Hello everyone! I have a piece of code that looks like this: if len(BuildList) 0: print The script