WMI - invalid syntax error?

py codecraig at gmail.com
Fri Dec 30 10:16:43 EST 2005


Tim Golden wrote:
> Could you just post (or send by private email if you prefer)
> the exact script you're running? If you want to send it
> privately, please us mail <at> timgolden.me.uk.

I am truly unsure what the problem could be, and the fact that the
error says "invalid syntax" ...just doesn't make much sense to me.
Perhaps I could print out the moniker and see if that looks right...any
suggestion on how to do that?

Anyway I have this:
import wmi

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


This is the same code, line for line, as i am using in a bigger script.
 It's got to be something stupid...just doesn't make any sense.  Wish
the error was more specific.




More information about the Python-list mailing list