WMI - invalid syntax error?

py codecraig at gmail.com
Fri Dec 30 11:15:02 EST 2005


py wrote:
>Something must be happening somewhere causing it
> to get fouled up.  I'm gonna try on a different PC.

I tried on another PC, same problem.

Also, I added "reload(wmi)" before I create an instance of wmi.WMI just
to see what happens, so I hve...

import wmi

def ppn(machine=None):
    try:
        reload(wmi)
        wmiObj = wmi.WMI(machine)
    except Exception, e:
        print "Error: " + str(e)

...now I get this as the error message..
Error: (-2147221020, 'Invalid syntax', None, None)

Slightly different than before...but same message.




More information about the Python-list mailing list