ironpython

How to add .dll reference to ironpython VS2010 project?

Hello. I have a sharpsvn .net library i want to use in ironpython project. Library is shipped as a .ney .dll file. For C# projects i just add this file to project "Reference" section and after that i can use a library: But for IronPython, the "Reference" section opens very strange window i can't figure out how to add .dll reference t...

How do you add an OnLoad event to an IronPython WinForm?

I'm having a problem getting the OnLoad event called from an IronPython script that uses WinForms, I've reduced the problem to the smallest possible reproduction case: from clr import AddReference, accepts, returns, Self AddReference("System.Windows.Forms") AddReference("System.Drawing") import System from System.Windows.Forms import *...

Python requires a GIL. But Jython & IronPython don't. Why?

Why is it that you can run Jython and IronPython without the need for a GIL but Python (CPython) requires a GIL? ...

Using IronRuby or IronPython to modify a list of C# objects

If I had a list of objects eg. List<Foo> where Foo has a couple of properties, could I then create one or more ironruby or ironpython scripts that run for each row. Here is some pseudo code: var items = new List<Foo>(); foreach(var item in items) { var pythonfunc = getPythonFunc("edititem.py"); item = pythonfunc(item); } I nee...

Easiest way to compile IronPython from the command line?

I've just started looking at IronPython, and I was hoping to build EXEs using NAnt. I'm not seeing much info on this... is it possible? Or, if not, is there a good alternative? ...

How can try python working in WPF?

Try Python is An interactive Python tutorial running in the browser. http://www.trypython.org/ But, I want to run it in my Winform or WPF application. How can I do that? I konw WPF support WebBrowser, could I use try python by it? I want to add a iteractive window in my application, not only run ironpython in it. ...

Using PyQt from IronPython

Is it possible to use PyQt from IronPython? From what I've read IronPython should work with CPython compatible libraries but out of the box it doesn't seem to work. If it is possible, will code completion work? ...

Would you recommend Iron Ruby, Iron Python, or PowerShell for making a C# application a script host?

After some quick tinkering, right now I'm leaning towards powershell for two main reasons (note these a purely my opinions and if they are wrong, I'd love to know!!!): 1) It's simple to create a runspace with classes in your application, and therefor easy to make your application scriptable. 2) I've heard some rumors that IronRuby and...

Ironpython: IEnumerator

Hello, I have a method that returns an IEnumerable of some type. Now I was wondering how I can iterate the IEnumerable with Ironpython? thanks ...

SQLCLR & IronPython

Hi, Im feeling crazy and I've decided I would really like to write a User-Defined Function in Python that would run in SQL Server 2008. I am interested in doing this as I have a few thousand lines of PL/Python functions written for PostgreSQL and I am interested to know if I can get the project running on SQL Server instead. I am looki...

Making the Case for IronRuby and IronPython

I guess everyone has already heard the news about some key developers leaving the Dynamic Languages team due to what they perceive as waning support for Dynamic Languages at Microsoft. I'm quite fond of Python and try to use it often. So, by extension, I care about IronPython and would like to see it continue to evolve. I'm sure many pe...

Using sqlite3 with IronPython 2.6 for .Net4

Hello, i'm working with SharpDevelop 3.2.0, IronPython 2.6.1 for .Net4. To have access to the sqlite3 functionality using this module for IronPython: IronPython.SQLite My program is an GUI application and access an sqlite database. When starting the program via ipy.exe interpreter from IronPython everything (included the database acce...

How to import COM into Ironpython?

In Cpython, I can use win32com. But, in ironpython, I didn't know how to import it. Because, in .net, one always use Visual Studio to interop the COM and to use it. ...

How well does IronPython 2.6 integrate with ADO.NET Entities?

If I were to write an application in IronPython 2.6, how easy would it be to use ADO.NET Entities as the DAL? Can anyone point to an example? ...

How to watch the types in dll?

import clr clr.AddReferenceToFileAndPath(r'E:\MyDocuments\Surface Extension\Samples\test.dll') But, How to watch the types in the test.dll. import test I got : error: No module named test Shold I must know the types in the test.dll?? ...

Can I use dynamic types in F#?

.net4.0 mytest.py def Add (a, b): return a+b I can use it in C# 4, like this: ScriptRuntime runtime = Python.CreateRuntime(); dynamic script = runtime.UseFile("mytest.py"); Console.WriteLine(script.Add(1, 3)); But, how can I use dynamic in F#? open System open Microsoft.Scripting.Hosting open IronPyth...

sqlite3 - Exception: database disk image is malformed

Hello, i'm working with IronPython 2.6 for .Net4 and sqlite3 module from: IronPython.SQLite. i have a written a GUI program what runs in four frames of an MDI window. Every of the four programs receives data from a serialport and stores this data in a sqlite database. One database per program. Between inserting this data on receive int...

Pattern for periodically updating screen data

I am new to the world of GUI programming and I am writing a little GUI app using IronPython and WinForms. It reads values from an external device and displays them in a ListView component (name, value). I want to periodically perform the reading and updating of the ListView component at a certain fixed rate. I had the following ideas to...

Type conversion from IronPython.Modules.PythonDateTime to System.DateTime

I'm hosting an IronPython engine instance in my C# (Silverlight 4) app to execute some Python scripts on the fly. These scripts can return values of either IronPython.Modules.PythonDateTime+datetime, IronPython.Modules.PythonDateTime+date or IronPython.Modules.PythonDateTime+time types. I need to convert these to System.DateTime values i...

IronPython Array[byte] to string

Hi every one, i try to save received data into file: #data Array[byte] fl = open(file_name, 'wb') fl.write(<.....>) fl.close() So how can i get string from Array[byte] to make it possible? Thank you in advance Serge ...