Pushing Python to Windows workstations
C42
nospam at nospam.net
Tue May 6 16:55:46 EDT 2003
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)
>> Per your instructions, I copied my installation of python (2.2)
>> including win32all to the network share and then created the python
>> files you mentioned and placed them in I:\Python\Lib.
>>
>> I then created the python.bat file and tried it out. It ran my one line
>> "Hello World" script with no problem. However, when I try to run my
>> program which contain references to win32net and win32api, it stops and
>> says "ImportError: No module named win32net".
That happens here as well, and I recall someone noting that win32net
does NOT work under Windows 98 (which is what we're running). Lacking
an available WinNT/XP machine for testing that theory, I can't confirm.
Google probably would find a reference if I'm right.
Correction... the error I get is:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: DLL load failed: A device attached to the system is not
functioning
With pythoncom, pywintypes, win32api, win32gui, win32com, ... all work
just fine. Only win32net produces that error for me.
Putting a "import sys; print sys.path" just before the import that fails
and verifying that it contains the win32 folder under your Python
installation
would be a good idea.
-Peter
More information about the Python-list
mailing list