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?
On May 8, 10:40 am, Klaus Alexander Seistrup <k...@seistrup.dk> wrote:
> HMS Surprise wrote:
> > Have I misused .extend?
> The .extend() method expects an iterable, try .append() instead.
> Klaus Alexander Seistruphttp://klaus.seistrup.dk/
That certainly cleaned up sys.path. Now if I can get the system to
search there for my lib file.
On May 9, 1:35 am, HMS Surprise <j...@datavoiceint.com> wrote:
> 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?
> import sys
> print sys.path
> print sys.path
> import urllib
> ['.', 'C:\\maxq\\lib\\Lib', 'C:\\maxq\\jython']
Your sys.path looks stuffed already. You may have missed this in the
flurry of posts and counter-posts, but I asked: have you been messing
with the PYTHONHOME environment variable?
This is what sys.path looks like after a normal installation, before
any messing about:
Environment variable PYTHONPATH not defined
Environment variable PYTHONHOME not defined
Python 2.2.3 (#42, May 30 2003, 18:12:0 [MSC 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
['', 'C:\\junk', 'C:\\python22\\DLLs', 'C:\\python22\\lib', 'C:\
\python22\\lib\\lib-tk', 'C:\\python22', 'C:\\python22\\lib\\site-
To get urllib to be imported from c:\python22\lib\urllib.py, you need
c:\python22\lib (NOT c:\python22) to be in sys.path, and it should
ALREADY be in sys.path (if you are running Python 2.2, of course).
Please go to a dos-prompt, type in what I did above and paste the
results into your next post.