sys.path

HMS Surprise john at datavoiceint.com
Tue May 8 11:35:40 EDT 2007


Is sys.path setup differnently in jython vs python? I have environment
variables pythonpath and jythonpath set to include C:\python22 but the
initial printout indicates it is being ignored. Also when I used
sys.path.extend, the added pathname shows up as a series of single
characters. Have I misused .extend?

Thanks,

jh

import sys
print sys.path
sys.path.extend("c:\python22")
print sys.path
import urllib



['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython']
['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython', 'c', ':', '\\', 'p',
'y', 't', 'h', 'o', 'n', '2', '2']
Traceback (innermost last):
  File "<string>", line 9, in ?
ImportError: no module named urllib




More information about the Python-list mailing list