Newbie Problem
Ralf Doering
ralf.doering at prakinf.tu-ilmenau.de
Thu Jul 29 01:56:44 EDT 1999
More information about the Python-list mailing list
Thu Jul 29 01:56:44 EDT 1999
- Previous message (by thread): Newbie Problem
- Next message (by thread): 1.5.2 for: else:
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
rbl at hal.cwru.edu writes: > > There is some Python code I've downloaded that I'm trying to run. > If I just drop the .py file on the Python icon, I get some errors, > so I am trying to run it interactively for debugging. > > Here is what happened: > > Python 1.5.1 (#37, Apr 27 1998, 13:36:04) [CW PPC w/GUSI w/MSL] > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam > >>> import sys > >>> import random > >>> import string > >>> > >>> def run(filename=''): > ... if filename=='': > File "<stdin>", line 2 > if filename=='': > ^ > SyntaxError: invalid syntax > >>> > > The original code segment is: [...] Just indent the "if" statement. Ralf -- No sig -- no fun
- Previous message (by thread): Newbie Problem
- Next message (by thread): 1.5.2 for: else:
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list