The patch is dumb-easy but made all the difference. This is simply a standard Python "limitation":
peterbe@trillian:/tmp $ python2.4 Python 2.4.4 (#2, Apr 12 2007, 21:03:11) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> filename = 'UserCookies.py' >>> source = open(filename).read() >>> print str(repr(source))[-50:] n self._del_usercookie(uid, key)\n ' >>> compile(source, filename, 'exec') Traceback (most recent call last): File "<stdin>", line 1, in ? File "UserCookies.py", line 29
SyntaxError: invalid syntax >>> compile(source.strip()+'\n', filename, 'exec') <code object ? at 0xb79ee120, file "UserCookies.py", line 1>
The patch is dumb-easy but made all the difference. This is simply a standard Python "limitation":
peterbe@ trillian: /tmp $ python2.4 .read() source) )[-50:] usercookie( uid, key)\n '
Python 2.4.4 (#2, Apr 12 2007, 21:03:11)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> filename = 'UserCookies.py'
>>> source = open(filename)
>>> print str(repr(
n self._del_
>>> compile(source, filename, 'exec')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "UserCookies.py", line 29
SyntaxError: invalid syntax source. strip() +'\n', filename, 'exec')
>>> compile(
<code object ? at 0xb79ee120, file "UserCookies.py", line 1>