[IronPython] Two Questions: C# "using" statements & MSH/Monad

Shawn Wheatley swheatley at gmail.com
Fri Mar 3 21:46:19 CET 2006

Hi all,

Thanks to Martin Maly, I got my first IronPython application up and
running. However, I could not figure out how to translate a "using"
statement into python syntax:


where "some_object" is garbage collected when no longer used. I don't
know of a similar construct in Python (except for "with", coming in
Python 2.5, which obviously isn't supported in IronPy... it's not even
out yet!)

Any ideas?

Question #2:
Has anybody worked with the System.Management.Automation namespace in
IronPython? I'd love to try to work in the power of the MSH cmdlets
with the syntax of Python. I got a simple example from the MSH
documentation online:


Unfortunately, there is no good documentation on the whole namespace,
so I'm hacking around with it right now, trying to figure out how to
create Commands and pass I/O back and forth. If anybody has tried this
with IronPython, please let me know.

Shawn Wheatley

More information about the Ironpython-users mailing list