[Tutor] Syntax Errors
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Tue Jan 3 22:52:14 CET 2006
On Tue, 3 Jan 2006, Jason Massey wrote:
> I've just finished ripping out a bunch of lines in one of my wxPython
> programs. Testing it out I get:
>
> C:\Python24>tla2.py
> File "C:\Python24\tla2.py", line 412
> self.grid.SetCellValue(0,0,"Site")
> ^
> SyntaxError: invalid syntax
>
> There's nothing wrong with that line. I didn't even touch it in the
> overhaul (refactoring is much too delicate of a word for the surgery I
> just did). I can make the error go away by unindenting the line, but
> all that happens then is the error gets passed onto the next line down.
Hi Jason,
Can you show us the line in context? That is, can you show us a few lines
above and below?
Also, let's make sure we're not running into a silly tab-vs-spaces issue.
Can you try running Python with the '-tt' command line option? This will
enable Python to strictly treat mixed tabs and spaces as a bad thing.
Good luck!
More information about the Tutor
mailing list