[IronPython] how to use an enum from a hosted script

2009-02-19 Thread Ernesto Cullen
hi all, I have IronPython hosted inside a c# project, and all goes well... until now when i want to use an enum c# type inside a script. For instance, I have in C# this declaration: public enum NotificationTypeEnum {Main,Detail} Then in a script I want to use this enum in an assignment:

Re: [IronPython] how to use an enum from a hosted script

2009-02-19 Thread Michael Foord
Dino Viehland wrote: Generally what you'd do is: import clr clr.AddReference('yourdll') from MyNamespace import NotificationTypeEnum I have no idea where the 'Imports are disabled' exception would come from though. If you could include the actual text of the exception that might be helpful.

Re: [IronPython] how to use an enum from a hosted script

2009-02-19 Thread Dino Viehland
Woops :) Yes, setting EngineOptions.ExceptionDetail may be more useful (depending on who's catching and printing the exception I guess). -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent:

[IronPython] Using setuptools to provide platform independence

2009-02-19 Thread Michael Foord
Hello all, Interesting post on how the shapely library (geometry calculation package) aims for platform independence using setuptools to switch the calculation backend. http://sgillies.net/blog/877/plugins-for-shapely This already works for CPython and head of Jython - IronPython seems to

[IronPython] IronPython 2 on Mono

2009-02-19 Thread Guido Amoruso
Hi, I'm trying to build IronPython from svn trunk on Linux (Ubuntu Hardy, with Mono 2.0.1) following the instructions at http://www.nabble.com/IronPython-2.0-RC-2-on-Mono-td20889619.html. Also tried using the last fepy patches (not only revision 597 as suggested in the email), but they don't

Re: [IronPython] IronPython 2 on Mono

2009-02-19 Thread Slide
On Thu, Feb 19, 2009 at 7:29 PM, Guido Amoruso guido...@gmail.com wrote: Hi, I'm trying to build IronPython from svn trunk on Linux (Ubuntu Hardy, with Mono 2.0.1) following the instructions at http://www.nabble.com/IronPython-2.0-RC-2-on-Mono-td20889619.html. Also tried using the last fepy

Re: [IronPython] IronPython 2 on Mono

2009-02-19 Thread Guido Amoruso
Applying the patches doesn't work: following the email instructions, just try applying the first one patch -p1 build/patch-exthack there is one removed files, and the other bits get rejected Hunk #1 FAILED at 16. 1 out of 1 hunk FAILED -- saving rejects to file