On May 7, 6:54 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Mon, 2007-05-07 at 16:24 -0700, HMS Surprise wrote: > > Since sys.path = ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython'] I > > copied urllib to c:\maxq\lib\Lib. > > > Now I get the error - > > > Traceback (innermost last): > > File "<string>", line 5, in ? > > File "C:\maxq\lib\Lib\urllib.py", line 1148 > > _hextochr = dict(('%02x' % i, chr(i)) for i in range(256)) > > ^ > > SyntaxError: invalid syntax > > The urllib.py you're using is not compatible with the Python you're > using. The snippet above uses Python 2.4+ syntax, and Jython's syntax is > at 2.1 (stable) or 2.2 (beta). > > -- > Carsten Haesehttp://informixdb.sourceforge.net
Thanks for posting. How does one ensure (or even detect) that their libraries are compatible? I loaded this library as part of Python 2.5. Thanks, jh -- http://mail.python.org/mailman/listinfo/python-list