ironpython

How to use IronPython with Visual Studio 2008

I've tried using the IronPython integration extension provided by Microsoft. But it does not work with Visual Studio 2008. Is there a proper VS 2008 IDE extension for IronPython? ...

Why is IronPython faster than the Official Python Interpreter

According to this: http://www.codeplex.com/IronPython/Wiki/View.aspx?title=IP20VsCPy25Perf&referringTitle=IronPython%20Performance IronPython (Python for .Net) is faster than regular Python (cPython) on the same machine. Why is this? I would think compiled C code would always be faster than the equivalent CLI bytecode. ...

Iron Python installed but project type missing from VS08

I installed IronPython.msi from Codeplex (http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=8365) and expected to see an entry for IronPython in VS08 (professional) when I go to create a new project but it is not listed. Where and what does this install add to my system? Am I missing something? C ...

Find and Replace Inside a Text File from a Bash Command

Whats the simplest way to do a find and replace for a given input string, say "abc", and replace with another string, say "XYZ" - the the file, /tmp/file.txt? I am wrtting an app and using IronPython to execute commands through SSH - but I dont know unix that well and dont know what I am looking for. I have heard that Bash script, apar...

IronPython performance

I'm considering embedding IronPython as a scripting language for an application that I'm writing. So to try it out, I downloaded IronPython 2.0 and fired up the interactive interpreter. Just starting the thing up takes about 5 seconds on my Intel Quad Core with 6 Gigs of memory. I can hardly imagine how much of a delay this would be f...

How to embed IronPython in a C# application for game scripting?

Hello everybody! I'm currently porting a my tiny space game project from Delphi 2007 Win32 to C#(and XNA). In Delphi, i used RemObjects Open Source scripting solution "PascalScript". Now that i continue developing the game with C#, i'd like to use IronPython for scripting purposes. The only problem is, that i don't know how to achie...

Help needed to convert code from C# to Python.

Can you please convert this code from C# to Python to be run on IronPython? I don’t have any experience with Python. using System; using Baz; namespace ConsoleApplication { class Program { static void Main() { Portal foo = new Portal("Foo"); Agent bar = new Agent("Bar"); foo.Connect("127.0.0.1", 1...

What is the best technology to use for automating a task using .net libraries?

Imagine that you need to develop and schedule an application/script to do the following:- Reference one or more .net assemblies Query the API, get some objects for each object call another method in the API What would you use? In the past I have created small console applications that do the above, but it seems a bit clumsy and over...

How to use IronPython with App.Config?

I have a class library that is usually called from a .net console or web application. It integrates with various components, and relies on an app.config or web.config. If I want to utilise the class library from script (i.e. IronPython), how can I get the script to utilise the config file? Ideally I want to be able to choose the config ...

How do I create a .NET assembly in IronPython and call it from C#?

I want to create an assembly using IronPython can call it from C#. Here are two things I am not asking. I'm not asking how to call C# from IronPython. The easiest documentation to find describes how to call C# from inside IronPython. (For example, the tutorial that ships with IronPython.) I want to do the opposite, call IronPython fro...

Import python functions into a .NET language?

I am a C# .NET programmer and am learning Python. I have downloaded IronPython, and know that it can call into .NET libraries. I'm wondering whether there is a way to do the reverse, that is to call into some existing "classic" Python libraries in my C# code, maybe using .NET Interop. I'd like to be able to access functions in libra...

Referencing an Assembly in the Application Path

I am trying to reference System.Data.SQLite which is located in the application path so that I can package it with the application. I have tried several different ways including: #1 clr.AddReferenceToFile("System.Data.SQLite.DLL") #2 clr.AddReferenceToFileAndPath("C:\\Path\\To\\System.Data.SQLite.DLL") #3 sys.path.append(os.getcwd()) ...

Has anyone used SciPy with IronPython?

I've been able to use the standard Python modules from IronPython, but I haven't gotten SciPy to work yet. Has anyone been able to use SciPy from IronPython? What did you have to do to make it work? Update: See Numerical computing in IronPython with Ironclad Update: Microsoft is partnering with Enthought to make SciPy for .NET. ...

Instantiating a python class in C#

I've written a class in python that I want to wrap into a .net assembly via IronPython and instantiate in a C# application. I've migrated the class to IronPython, created a library assembly and referenced it. Now, how do I actually get an instance of that class? The class looks (partially) like this: class PokerCard: "A card for pl...

How to get the Freebase Python libraries to work in IronPython

How do I get the Python libraries for using the Freebase API to work under IronPython 2.0? When I "import freebase.api", I get "ImportError: No module named django.utils". What gives? ...

IronPython "LookupError: unknown encoding: hex"

When I try to "import simplejson" (or something that depends on it) in IronPython 2.0, I get "LookupError: unknown encoding: hex". How do I make this work? ...

Accessing embedded resources in IronPython

Hi I'm developing a Windows Forms Application in IronPython Studio. I want to choose an Icon for my project but both of these fail: 1- Form Properties window -> Icon (choose a *.ico file) a compile-time error occurs and is related to IronPython.targets file The "IronPythonCompilerTask" task failed unexpectedly. System.ArgumentNul...

Python or IronPython

How does IronPython stack up to the default Windows implementation of Python from python.org? If I am learning Python, will I be learning a subtley different language with IronPython, and what libraries would I be doing without? Are there, alternatively, any pros to IronPython (not including .NET IL compiled classes) that would make it ...

BOO Vs IronPython

What is the difference between IronPython and BOO? Is there a need for 2 Python-like languages? ...

IronPython memory usage

I'm hosting IronPython in a c#-based WebService to be able to provide custom extension scripts. However, I'm finding that memory usage sharply increases when I do simple load testing by executing the webservice repeatedly in a loop. IronPython-1.1 implemented IDisposable on its objects so that you can dispose of them when they are done....