COM problem .py versus .exe
Tim Golden
tim.golden at viacom-outdoor.co.uk
Wed Jun 29 08:30:47 EDT 2005
[Greg Miller]
|
| I put you code snippet into my code, running it from the desktop PC
| gave me the following output ( I added a print statement ):
|
| . . . winmgmts:
| TTTTTTTTTTTTTTTTT i.Caption is \\rocps00101\ROCPR001
| TTTTTTTTTTTTTTTTT i.Caption is \\ROCPS00101\ROCPR024
| TTTTTTTTTTTTTTTTT i.Caption is \\ROCPS00101\ROCPR070
| TTTTTTTTTTTTTTTTT i.Caption is \\rocps00101\ROCPR143
|
| so that appears to work great, I took out the for i in
| c.Win32_Printer.... statement, built the executable, but still get the
| exact same error on the embedded PC.
| It errors as soon as the import wmib call is made, so it never gets to:
|
| wmi._DEBUG = 1
| moniker = "winmgmts:"
Curious. Within the import, there is one call to GetObject ("winmgmts:")
(line 157, if you're interested) to provide the constants (courtesy of
some code by Thomas H). I can only assume that it's that which is failing.
Which, in itself, suggests that for some reason WMI is available on the
target machine.
| I will check around to
| see if the win32 calls you were referring to made it into the pywin32
| package.
The example in my later post definitely works against pywin32 build 204.
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list