[IronPython] "Cannot import name Enum"

Srivatsn Narayanan srivatsn at microsoft.com
Fri Jul 11 02:32:13 CEST 2008


You will have to call LoadAssembly on your ScriptRuntime to load mscorlib.dll:

scriptRuntime.LoadAssembly(typeof(string).Assembly)

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
Sent: Thursday, July 10, 2008 5:27 PM
To: Discussion of IronPython
Subject: [IronPython] "Cannot import name Enum"

Hi all,
I'm hosting IronPython 2.0b3. When executing "from System import
Enum", I get the error "Cannot import name Enum ". It works fine when
executed from the console. Do I need to set up some references in the
hosting code to make this work?

-Jeff
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list