python WMI pass by reference
Roman Rohr
rr at oliva.uhk.cz
Tue Feb 4 19:18:30 EST 2003
Can anyone rewrite this small vb script in python?
getobject("winmgmts:win32_logicalFileSecuritySetting.path='c:\boot.ini'").getsecuritydescriptor sd
for each t in sd.dacl
wscript.echo t.trustee.name
next
Only first line and passing parameter sd is important. Sorry for
disturbing with vbscript code, but I hope this is best way to explain my
problem.
I don't know how to make "pass by reference" in python. In this case how
to pass variable sd, which should receive object from called function? I
read nearly everything on the Internet. I know that:
1. I don't need pass by ref in python at all. Each function can return
tupple or list.
2. I can use COM makepy utility and use COM objects without any problem.
But if I understand well, WMI objects are not COM objects.
Thanks in advance for any hint. First line translated into python is more
than enough.
Roman
More information about the Python-list
mailing list