OK, that change works fine and the choice of placement seems to be better than
where I had it.
I think you misunderstood me about the
SET PYTHONPATH=C:\$JWORK\PYTHON;c:\Inetpub\wwwroot\ASSP
My main working directory really is "$JWORK", probably not a legal name in Linux,
but it sorts to the top of the directory list in Windows Explorer and is easy to
find.
Also, the two entries in pythonpath appear everywhere except where CGIWrapper is
used. Here's the sys.path from the PythonWin interactive window again:
>>> sys.path
['', 'c:\\$jwork\\python', 'c:\\inetpub\\wwwroot\\assp',
'c:\\python20\\win32',
'c:\\python20\\win32\\lib', 'c:\\python20\\pythonwin', 'c:\\python20',
'c:\\python20\\dlls', 'c:\\python20\\lib',
'c:\\python20\\lib\\plat-win',
'c:\\python20\\lib\\lib-tk', 'c:\\python20\\mysql',
'c:\\python20\\pil',
'c:\\python20\\ppm']
>>>
Note the absence of the pythonpaths isn't causing me a problem, but it is curious
and I couldn't find an explanation for it by looking at the CGIWrapper source. It
could be a problem for someone.
After I wrote the previous note, I went back and executed a script under PythonWin
and Idle. PythonWin appends the script's directory to sys.path and removes the
leading '' shown above. Idle inserts the scripts directory as the first entry in
sys.path, or the same as executing a script from a DOS window. While your change
works for me, it might be more consistent to add the absolute path of the scripts
directory.
Roger Haase
Chuck Esterbrook wrote:
> At 02:24 PM 6/14/2001 -0700, haaserd wrote:
> >Based upon the above, there seems to be a lot of inconsistancy. I think
> >CGIWrapper should be changed to append or insert the '' as my import
> >statements
> >were working under PWS and Apache. I am not sure my placement makes sense, as
> >it would happen only if the current working directory is changed. I am also
> >confused about the missing paths from my 'set pythonpath' statement.
>
> I'm not sure why the PYTHONPATH is missing, but it seems to be missing
> everywhere which indicates a problem with the environment and not any
> Python tool.
>
> Mine looks like this:
> SET PYTHONPATH=/All/echuck/Projects/Webware
>
> (BTW I only put Webware in my path so that I can easily import MiscUtils
> from various other Python programs I write. Otherwise, I wouldn't bother.)
>
> Also, it's not $foo in DOS, it's %foo%. Try something simple like:
> SET PYTHONPATH=/abc/def
>
> Then add in the rest, keeping in mind %% instead of $. If new problems crop
> up, try quotes around the value.
>
> Regarding '' in sys.path, I have found Python to be very inconsistent with
> this. My own experience indicates that if the first thing in sys.path is ''
> then I am always happy and never sad.
>
> The '..' is a kludge so that CGI Wrapper can find the other Webware
> components. There should be an abspath() call to expand it out.
>
> I have updated CVS for these. Can you test them out?
>
> -Chuck
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss