Hello all,
Not really sure that I have a problem with win32 Extensions here but
anyway..
(Please also note that I'm not very well versed with win32 nor COM, I
merely use it when
I develop Python apps that use COM objects.)
I try to call a method on the Solid Edge API, which provides a COM
Thank for the stellar explanations and code.
You plus the other posters and esp. the code examples make it clear
what's going on.
It's been very helpful. Thanks,
Lee G.
On Tue, 29 Jan 2008 10:39:25 +, "Tim Golden" <[EMAIL PROTECTED]>
said:
> leegold wrote:
> > ...snip...
>
> > I was com
Thans a lot for your answer. In an indirect way it brought me towards the
solution.
"command-line window" was a bad way to indicate PythonWin, IPython shell or
just the Python interactive prompt running python.exe from command line.
After trying without success also "python.exe < test.py" I figure
Tim Johnson wrote:
> YES!!! It works. I was able to successfully run the following version:
>
[... snip working version ...]
Excellent news. Glad to hear it.
> I'd say almost 100% of all WMI scripts out
> there are for getting information, not setting it
I think you're right. It took me sev
Oh, and thanks for pointing out the Pythonic style points as well. I'm
still a relative newbie to Python, and when I'm reading examples written in
vbscripts I sometimes get out of the groove. I'll go take another look at
those examples.
On Jan 30, 2008 1:39 AM, Tim Johnson <[EMAIL PROTECTED]> wr
YES!!! It works. I was able to successfully run the following version:
###
import wmi
site = 'MV1'
wmi_server = 'mtv-sql-2'
resource = 23012
wmi_namespace = 'root\\sms\\site_%s' % site
conn = wmi.WMI(computer=wmi_server, namespace=wmi_namespace)
coll = conn.SMS_Collection(CollectionID='MV100362
Tim Johnson wrote:
> import wmi
> site = 'MV1'
> wmi_server = 'mtv-sql-2'
> resource = 23012
> wmi_namespace = 'root\\sms\\site_%s' % site
> conn = wmi.WMI(computer=wmi_server, namespace=wmi_namespace)
> coll = conn.Get('SMS_Collection.CollectionID="MV100362"')
> rule = conn.Get('SMS_CollectionRule
Tim Johnson wrote:
> Hmm, I'm getting a different error now. Could it be having trouble passing
> one wmi object as a parameter to the method of another?
>
> import wmi
> site = 'MV1'
> wmi_server = 'mtv-sql-2'
> resource = 23012
> wmi_namespace = 'root\\sms\\site_%s' % site
> conn = wmi.WMI(comp
I'm afraid pythonwin has a few issues regarding non-ascii characters - eg, see:
http://sourceforge.net/tracker/index.php?func=detail&aid=1746689&group_id=78018&atid=551954
and I think there are a couple of others, but I can't find them at the moment.
Mark
> -Original Message-
> From: [E