Pythonwin (win32all build 148) on Python 2.2.1 on Win2K, bogus syntax e

A. Dimsdale Fetus A. Moser fetus at AUTO
Wed Sep 25 02:04:42 CEST 2002


I am running Pythonwin (win32all build 148) on Windows 2000 Professional with
Python 2.2.1. When I attempt to run a Python script in it, it halts the running
of the script on supposed syntax errors, which are completely bogus.
Examples:
First line of our (Aaron L. Dimsdale and Alex S. Moser) first semi-significant
Python script, called fight:
"""fight.py 5.0 -- crappy primitive fighting game by alex s. moser & aaron l.
dimsdale"""
        ^^^ (note: no linebreak in that line)
"""if one of the players does not say "atk" or "rest" when asked, they will \
forfeit their turn"""

Pythonwin barfed on the quote marks marked by carets, returning: "Failed to run script -
syntax error - invalid syntax".
I removed those quote marks and the quote marks at the beginning of the second
documentation line, and left those two lines as one string. Then, several lines
later:

p1char = str(raw_input("Player 1, choose your character class: "))
                 ^
For some strange reason (Alex and I determined that it was either cosmic rays
or Windows 2000 rot), Pythonwin returned the same error, pointing at that
particular "i" character. I removed "str" and its set of parens, and it still
slapped me with the same error on the same character/command.

p1weap = str(raw_input("Player 1! Pick your weapon! steak knife, cleaver, tenderizer "))
                          ^
Pythonwin also pointed out a supposed syntax error on that "a" character in the
word "Player".

This is so randomly weird it hurts. We couldn't figure out what the hell is
going on. By the way, these errors only occured on Aaron's computer at work,
in Pythonwin; the script worked fine on Alex's computer, in the same office;
on Alex's home computer; on Aaron's home computer; and on Aaron's work computer
(the same that gave the syntax errors) under the interpreter packaged with
Python itself (not the win32all extensions).

--Aaron Dimsdale and Alex Moser



More information about the Python-list mailing list