Syntax error [was: Installed modules list?]
John J. Lee
phrxy at csv.warwick.ac.uk
Fri Apr 20 12:33:18 EDT 2001
On Fri, 20 Apr 2001, Jeremy Hylton wrote:
> Never mind my previous message. It's pretty clear from the grammar.
>
> stmt: simple_stmt | compound_stmt
> simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
> small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt
> compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
>
> 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.
John
More information about the Python-list
mailing list