Mono 1.2.5 is out.
So, the necessary changes to support the DLR at all are in place.
Alas, it still has some limitations -- (bug 82650)
import clr | |
clr.AddReference("System.Windows.Forms") | |
from System.Windows.Forms import * | |
print dir() |
fails in the import statement with
Traceback (most recent call last): File __main__, line unknown, in Initialize File WinUI, line unknown, in Initialize TypeError: Argument cannot be null. Parameter name: type
which is not quite "at the first hurdle", but does make it useful to keep the WinForms import in a single file, so if I need to explicitly enumerate, I only have to do it once.
A pity that Python isn't quite as malleable as Ruby so far as stringname-to-symbol matching goes. The next best thing, this
import clr | |
clr.AddReference("System.Windows.Forms") | |
import System.Windows.Forms | |
_f = None | |
for _x in dir(System.Windows.Forms): | |
try: | |
_f = System.Windows.Forms.__dict__[_x] | |
if callable(_f): | |
globals()[_x] = _f | |
except: | |
pass | |
del _x | |
del _f |
doesn't fare any better. *sigh*