Now what!?
notbob
notbob at nothome.com
Sat May 10 12:19:19 EDT 2008
Grrr....
I'm following A Byte of Python and into the while loops chap. I cp/paste
while.py to a file and give 777 perms. I mv while.py to while and run it (./while)
as a standalone script. I get errors.
Here is the script:
while.py
http://www.ibiblio.org/swaroopch/byteofpython/read/while-statement.html
When I run it as.....
$ python while
.....it works perfect. But, if I run it simply as.....
$ ./while
.....I get this:
$ ./while
number: illegal number: =
./while: line 6: running: command not found
./while: line 9: syntax error near unexpected token ('
./while: line 9: guess = int(raw_input('Enter an integer : '))'
Why does it work one way and not the other. If I run the simple hello world
script the same way ($ ./helloworld) and it works fine. Same shebang, same
dir, same permission, etc. I even meticulously indented everything
perfectly by hand. What am I missing?
BTW, anyone know a better cli news client/editor combo than slrn/jed (don't
even think vi!)? When I cp/past code (or most anything else) to jed, all
the lines become stair-stepped. This is no biggie for a most stuff, but for
idented code, it's unacceptable.
nb
More information about the Python-list
mailing list