[IronPython] "Cannot import name Enum"

Jeff Hardy jdhardy at gmail.com
Mon Jul 14 04:21:00 CEST 2008


Hi Srivatsn,
That did the trick, thanks.

-Jeff

On Thu, Jul 10, 2008 at 6:32 PM, Srivatsn Narayanan
<srivatsn at microsoft.com> wrote:
> 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
>
> _______________________________________________
> 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