On May 7, 6:31 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > HMS Surprise <[EMAIL PROTECTED]> writes: > > 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 > >>> dict(1, 1) > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: dict expected at most 1 arguments, got 2 > > >>> dict(a=1) > {'a': 1} > > -- > Jorge Godoy <[EMAIL PROTECTED]>
Using the 18.5.2 Examples and a few lines added in from CompactTest import CompactTest import sys print sys.path import urllib class login(CompactTest): # Recorded test actions. def runTest(self): self.msg('Test started') opener = urllib.FancyURLopener({}) f = opener.open("http://www.python.org/") f.read() # Code to load and run the test if __name__ == 'main': login('login').Run() -- http://mail.python.org/mailman/listinfo/python-list