ironpython

Script arguments and Embedded IronPython

I have an embedded scripting engine in my C# application that uses IronPython 2. I create the Python runtime and add a few classes to the global namespace so that the script can import them as modules. However, one (pretty basic) thing I can't figure out is how to send script arguments. I realize that I could just create a variable with...

IronPython compiler version at runtime

How to get IronPython compiler version at runtime (interactive session)? ...

IronPython to Original Python comparison. What can I expect from the first one?

I wish to learn Python but I'm working all day in .Net as a C# developer, so I decided to download and install IronPython and integrated IronPython studio. How different or similar from the original Python it is? As a .Net developer can I expect to run conventional Python script in .Net environment with no problem or this is just the sam...

IronPython 2.6 RC2: Cyrillic character and -X:TabCompletion switch

Cyrillic characters are displayed incorrect while entering in interactive mode if interpreter was started with -X:TabCompletion switch. It looks like that: s="????" ...

Embedded IronPython Memory Leak

I need some help finding a solution to a memory leak I'm having. I have a C# application (.NET v3.5) that allows a user to run IronPython scripts for testing purposes. The scripts may load different modules from the Python standard library (as included with IronPython binaries). However, when the script is completed, the memory allocated...

trouble executing Selenium python unittests in C# with ScriptEngine (.NET 3.5)

Hello all, first time poster. I'm turning to my first question on stack overflow because I've found little resources in trying to find an answer. I'm looking to execute Selenium python tests from a C# application. I don't want to have to compile the C# Selenium tests each time; I want to take advantage of IronPython scripting for dyna...

How to use Microsoft.Scripting.Hosting?

To embed some IronPython Code into C# I want to use the ScriptEngine using IronPython.Hosting; using Microsoft.Scripting.Hosting; I found the reference for IronPython, but where is the necessary reference for Scripting.Hosting? I can't find it within VisualStudio 2008, targeting .Net 3.5. ...

Using Python Libraries in Compiled IronPython

I have a python script which works well when it isn't compiled but when I compile it using pyc it is unable to access the standard python libraries (sys and os in this case). Is there a way of compiling them into the project? ...

How does ironpython speed compare to other .net languages?

Hi, I would like to give sources for what I'm saying but I just dont have them, it's something I heard. Once a programming professor told me that some software benchmarking done to .net vs Python in some particular items it gave a relation of 5:8 in favor of .NET . That was his argument in favor of Python not being so much slower than ...

Python: stop execution after a maximum time

Hello, I have an IronPython script that execute some exes. I want to stop the execution of the current exe if its runtime exceeds a certain amount of time. How can I do this? Current function: def execute(programName): t0 = time.time() #should stop the execution of "programName" #if execution exceeds limit p = os.popen...

C# or other .net equivalents of core python modules for IronPython?

I would like to compile and distribute (on .net) some python programs that work well with IronPython, but I am new to .net and am getting errors related to particular python modules. There is a utility for compiling to low level .net and it works well, but I get errors when dealing with common libraries; code that runs in the interprete...

C# Running IronPython On Multiple Threads

I have a WPF app that controls audio hardware. It uses the same PythonEngine on multiple threads. This causes strange errors I see from time to time where the PythonEngines Globals dictionary has missing values. I am looking for some guidance on how to debug/fix this. The device has multiple components [filter's, gain's, etc.]. Each co...

IronPython asp.net IntelliSense

I'm trying IronPython for asp.net, I got a simple CRUD screen to work. I've read IntelliSense doesnt work for IronPython, but is there any way to get rid of Visual Studio underlining all the lines' starting tokens with blue and a message of "expected declaration"? ...

How to impress developers with IronPython/Python

I need an IronPython\Python example that would show C#/VB.NET developers how awesome this language really is. I'm looking for an easy to understand code snippet or application I can use to demo Python's capabilities. Any thoughts? ...

VB webform in IronPython asp.net website

Hi, I tried to bring a previously done webform made in vb.net to an IronPython asp.net website with no luck. After seeing it didnt work, I tried to write the simplest codebehind vb.net webform to see if there was a problem with vb.net in an IronPython website and I got the following usual error "be sure that the defined class in this ...

What are the (dis)advantages of writing unit tests in a different language to the code?

Unit tests have different requirements than production code. For example, unit tests may not have to be as performant as the production code. Perhaps it sometimes makes sense to write your unit tests in a language that is better suited to writing unit tests? The specific example I have in mind is writing an application in C# but using I...

Nonblocking webserver on .Net for Comet applications

I am trying to implement a Comet style (e.g. chat) application using IronPython. While I don't need to scale to twitter like dimensions, it is vital that the response time is lightening fast. All the possibilities in Python (Twisted, Tornado, Magnum-Py) do not work with IronPython, often because of epoll support. Is there a default ch...

Rollback in Ironpython using System.Data.SqlClient

I am unable to rollback using the following code snippet and need help: import clr import sys clr.AddReference('System.Data') from System.Data.SqlClient import SqlConnection, SqlParameter, SqlTransaction conn_string = "****" connection = SqlConnection(conn_string) connection.Open() createuser = connection.CreateCommand() createuser.Comm...

IronPython ScriptRuntime equivalent to CPython PYTHONPATH

The following import works inside ipy.exe prompt but fails using IronPython ScriptRuntime inside a C# 4.0 program. import ConfigParser C# code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using IronPython.Hosting; using Microsoft.Scripting.Hosting; namespace CSharpDynamic { class Program {...

What is the equivalent of the C# "using" block in IronPython?

What's the equivalent of this in IronPython? Is it just a try-finally block? using (var something = new ClassThatImplementsIDisposable()) { // stuff happens here } ...