Syntax error [was: Installed modules list?]

Gerhard Häring gerhard.nospam at bigfoot.de
Fri Apr 20 16:13:49 EDT 2001


>> You can only join simple statements with a semicolon.  None of the
>> statements that use colons between parts are simple statements.
>
>Is there any way to work around this for the purpose of simple unix
>scripts using python -c, then?  Other than putting the python in a
>separate file, of course.

Type the following in a shell and press ^J for newlines. It works:

python -c "
for i in range(10):
    print i
"

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de
web:    http://highqualdev.com



More information about the Python-list mailing list