[placid] | > Now i was trying to use service.ChangeStartMode but each | time i pass in | > an argument i get the error; | > | > #TypeError: __call__() takes exactly 1 argument (2 given) | > | > but; | > | > >>> print service.ChangeStartMode | > <function ChangeStartMode (StartMode) => (ReturnValue)> | > | > ChangeStartMode needs an argument! | > | > What im i doing wrong here? | | And to answer my own question, the way to pass in arguments is via the | key=value way so; | | service.ChangeStartMode(StartMode = "Automatic")
Yes, sorry about that, it's a well-known (to me) gotcha. Basically there's no way I can extract the params from the COM interface in a way which implies order, so I can't take them in positionally. (Corrections to this statement will be gratefully received). 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 ________________________________________________________________________ -- http://mail.python.org/mailman/listinfo/python-list