Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-24 Thread Tim Golden
On 24/06/2011 15:09, Graham Bloice wrote: On 24/06/2011 14:59, M Saunders TAS wrote: Graham Bloice wrote: In the Python call to AddVirtualSystemResources() you've reversed the order of the parameters. Additionally the method signature for AddVirtualSystemResources() returns function

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-24 Thread Tim Golden
On 24/06/2011 15:29, Tim Golden wrote: The __setattr__ logic does involve a certain level of cacheing and redirection, so there definitely is scope for an error in the WMI code ... and here I mean in the code of the wmi.py module ;) TJG ___

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-22 Thread Tim Golden
On 21/06/2011 21:57, M Saunders TAS wrote: python scsi_add_short.py Traceback (most recent call last): File scsi_add_short.py, line 15, inmodule HD.Address = 100 File c:\python27\lib\site-packages\wmi.py, line 571, in __setattr__ handle_com_error () File

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-21 Thread Tim Golden
On 21/06/2011 16:13, M Saunders TAS wrote: I'm trying to use python and the fantastic WMI module to manage Hyper-V virtual machine resources and am having problems trying to modify properties of an instance to pass back via WMI. The following code in powershell is what I need to emulate in

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-21 Thread Graham Bloice
On 21/06/2011 16:13, M Saunders TAS wrote: Hi, I'm trying to use python and the fantastic WMI module to manage Hyper-V virtual machine resources and am having problems trying to modify properties of an instance to pass back via WMI. The following code in powershell is what I need to

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-21 Thread Tim Golden
On 21/06/2011 17:06, Graham Bloice wrote: In the Python call to AddVirtualSystemResources() you've reversed the order of the parameters. Aha. And to help out the OP, you can pass parameters by name as well as by position. (As you have done in the previous method call). TJG

Re: [python-win32] How to get a proxy instance of a WMI object.

2011-06-21 Thread M Saunders TAS
[... snip horrendous Powershell stuff ...] I never can understand why people like Powershell syntax so much grin Indeed, it is syntactically horrendous. I wrote that after I hit problem in Python to test the concept, honest... I'm not going to be much help here, I'm afraid: I don't have