ironpython

Being unable to import module after succesfully adding reference, in asp.net IronPython

I'm adding a reference to a funciones.dll file using clr.AddReferenceToFileAndPath() because I couldnt get it to work other way with this file and it succesfully does it. The file is named funciones.dll and it's in the bin folder. But when I do from funciones import * I get "no module named funciones" since the funciones.dll file...

How to pass options to a new IronPython engine?

I am hosting IronPython within IronPython. I did not find the way to initialize it with the equivalent of the command line argument: -X:FullFrames. My code is somewhat like that: import clr clr.AddReference('IronPython') clr.AddReference('Microsoft.Scripting') from IronPython.Hosting import PythonCommandLine, PythonConsoleOptions, Pyth...

why are some IronPython dlls generated with a DLRCachedCode class inside?

when I compile some .py codefiles with no class definitions into dlls , the compiled dll is created with a "DRLCachedCode" class inside. Why is that? ...

NLTK in IronPython from WPF

Hi, I need some guidance on where to start on this issue, or to know if it is possible. I would like to use NLTK (Natural Language Toolkit) for Python using IronPython and call from an exisiting WPF/c# project. Is it possible to reference NLTK from within WPF in this way. For example to use Named Entity Recognition from NTLK? Any a...

.Net Array or IList<T> from NumPy array in IronPython?

Imagine I have a .Net application that supports user extensions in the form of Python modules by embedding IronPython. Using Ironclad, I can allow users to make use of the NumPy and SciPy packages from within their modules. How good is the interop provided by Ironclad? My question is: can I use a NumPy array of type T provided by the use...

Code protection system which works with IronPython assemblies?

do you know/have you tried any code protection system which works with IronPython assemblies? Can you list it/them here? ...

web programming technique, is this a major security risk?

I've found this technique to be interesting to short some coding time. Not having to re-create database related statements along with a form binder for webcontrols is indeed interesting in my opinion. But I was wondering if it should be considered a major security risk for non intranet projects because it shows the database structure to ...

clr.CompileModules(...) "couldn't find member CompileModules"

Visual Studio 2008 SP1 installed, asp.net ironpython website import clr #ok clr.AddReference('System') #ok but clr.CompileModules(...) "couldn't find member CompileModules" Anyone got this? The member CompileModules is supposed to exist, at least in some versions, to do something like this clr.CompileModules("f...

IronPython for asp.net integration with Visual Studio 2008

hi, I have Visual Studio 2008 Professional SP1 installed. I also have IronPython v. 2.6 installed. In the C:\Program files\IronPython folder there is an IronPython.dll file version 2.6.911.0. But when I create an asp.net website project in IronPython in Visual Studio, the IronPython.dll file created in the bin folder is listed as versio...

IronPython WebbrowserControl - form creation issue

Hi, I'm using IronPython 2.6 and a WebbrowserControl on a form called TridentForm. This is used for displaying reports, etc. The main form, LaunchForm, has a button that has an OnClick event handler. This event handler sets some stuff up and then kicks off a BackgroundWorker. The Background worker completes, and in this callback it ins...

asp.net websites in IronPython Studio

Does anyone know how to enable opening websites in IronPython Studio? Right now it only allows me to open Windows or WPF applications, do I need to install something else? ...

Passing multiple arguments from IronPython to .NET method.

Hi, I have a class in .NET (C#): public class MyHelper { public object exec( string script, params object[] arguments ) { // execute script with passed arguments in some external enviroment } } I'm using IronPython runtime in my code to run python scripts, which should in some cases call the "exec" method. I would lik...

System.StackOverflowException in IronPython program

I'm using Visual Studio 2008 Professional SP1, and I have an asp.net with IronPython 2.6.911.0 website I added a funciones.dll file to the bin folder of the simplest aspx.py file possible (just created). I added "import funciones" to the codefile and I got this. "unhanddled exception of type 'System.StackOverflowException' in mscorlib....

Running DLR Embedded Scripts in Minimum Security Context

I need to get pointed in the right direction. I have embedded an Iron Python scripting host into a simple C# application, but now I need to know the best practices for locking down security on a user generated IronPython or IronRuby script. Specifically, what are the strategies for preventing library imports and isn't there a way in .NE...

How to store objects created in IronPython to object databases

I'd like to use object database to persist some classes created in IronPython. The database is db4o for .NET 2.0 (downloaded today). The code looks like this: import clr clr.AddReferenceToFileAndPath(r"C:\dev\Db4objects\db4o-7.12-net20\bin\net-2.0\Db4objects.Db4o.dll") from Db4objects.Db4o import * db = Db4oFactory.OpenFile(r'G:\IronPyt...

Can't import numpy into embedded ironpython engine.

From an ipy console I can import ironclad import numpy with no problem. However when I try the same imports with an embedded interpreter the numpy import fails. My Python engines is set up like this: public PyEngine() { //Frames option needed to use sys.__getframe //used in Numpy and others. Dictiona...

How to create a package in c# for use in IronPython

I have seen documentation on the IronPython mailing list that describes how to write an extension module in c#. I've been able to follow the documentation and it works fine. However, does anyone know how to go about producing a hierarchical extension PACKAGE in c#? For instance you are supposed to do something like this for a module: ...

How to embed a graphical interactive IronPython shell in an application?

I've tried the obvious path in my pet open source project RevitPythonShell (a plugin for the building modeling software Autodesk Revit Architecture 2010): code.interact() with the IronPython engine set up to use .NET streams for STDIN and STDOUT. These I then redirect to a TextBox control. It kinda works, but really is only an ugly hack....

Why can't IronPython be installed with Visual Studio 2010?

IronPython has been out for a while now, so when I installed Visual Studio 2010 RC1 "Ultimate" this morning I was surprised to find that it couldn't be selected from the installer. Instead, one still has to go out to Codeplex. Does anybody know why it hasn't been included? ...

Name some non-trivial sites written using IronPython & Silverlight

Just what the title says. It'd be nice to know a few non-trivial sites out there using Silverlight in Python. ...