When the .psp file is compiled to a .py servlet, the
__orig_file__ value is inserted, but no quoting is done
on the file path. On Windows, this can mean that the \s
in the file path are interpreted as escape sequences,
which could potentially be invalid, leading to a
ValueError when the servlet is imported.
PSP file c:\xtian\webware\PSP\Examples\index.psp
results in a .py servlet with the line
__orig_file__ = 'c:\xtian\webware\PSP\Examples\index.psp'
Since \x expects a two-digit hex number, \xti triggers
A related problem can occur if the file has
single-quotes in its path - the generated line would be
__orig_file__ = 'c:\xtian's\webware\PSP\Examples\index.psp'
which is a syntax error.
In Webware/PSP/ParseEventHandler.py at line 277, change:
self._writer.println("__orig_file__ = '%s'" %
self._writer.println("__orig_file__ = %r" %
so that the %r format specifier correctly handles \ and