Pushing Python to Windows workstations

Peter Hansen peter at engcorp.com
Tue May 6 18:34:17 EDT 2003


C42 wrote:
> 
> I created the following code to add the path statements I need. When I
> placed this before "import win32net", it worked just fine.
> 
> import sys
> 
> my_path = 'I:\\Python\\lib\\site-packages\\win32'
> sys.path.append(my_path)
> my_path = 'I:\\Python\\lib\\site-packages\\win32\\lib'
> sys.path.append(my_path)
> my_path = 'I:\\Python\\lib\\site-packages'
> sys.path.append(my_path)

Interesting... are you sure all three are required?  

Is this i:\python\lib\site-packages folder the standard site-packages,
or a look-alike you created elsewhere (i.e. not under the folder where
python.exe resides)?

Are you running Win98?  If so, I'll see whether I can get my win32net
to load as well with something similar, or cleaner.  You certainly don't
want to go doing that wherever you need it... try using a .pth file
instead, though note that sys.path should already include the site-packages 
folder if things are set up correctly.  Do you have PYTHONHOME set 
properly to point to i:\python ?

-Peter




More information about the Python-list mailing list