Search Wiki:

Welcome!


IronPython is a new implementation of the Python programming language running on .NET. It supports an interactive console with fully dynamic compilation. It is well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers, while maintaining full compatibility with the Python language.

Last edited Thu at 4:12 PM  by dfugate, version 80
Comments
koder wrote  Sep 6 2006 at 9:31 AM  
>> IronPython has a more modern GC

>> IronPython does not have guarantees for when finalization or system resource freeing occurs
>> IronPython does not immediately invoke __del__ methods when del is called on a variable

Is this behavior realy acceptable?
No one of my program will work correct with this
GC.
In fact i need explisitly call destructor for
each class instance like i call 'delete' in C++.
IMO need write "IronPython has a worsest GC compare to any other Python implementation"

koder wrote  Sep 6 2006 at 9:35 AM  
P.S. I understand that this problem of .NET, not IronPython itself, but "we have what we have".

ryszarddrozd wrote  Sep 12 2006 at 8:03 AM  
I think there is a little bug in all Samples with NotifyIcon component.

Simple workaround:

one additional line in __init__:

self.Closed += self.OnClosed

and definition of OnClosed:

def OnClosed(self, *args):
self._notifyIcon1.Dispose()

alexjames wrote  Sep 15 2006 at 11:12 AM  
I have just started playing around with IronPython. I have no Python experience at all, but I was up an running and using my existing .NET dlls in about 30 minutes, thanks mainly to the excellent tutorial! More here:
http://www.base4.net/blog.aspx?ID=111

Well done guys.

kitsu wrote  Oct 4 2006 at 1:23 AM  
I have a question: Once this gets an installer can it also get its own file extension? I'm thinking *.ipy if it isn't taken by something else people already have.

Right now IronPython scripts are all named foo.py, and are indistinguishable from CPython scripts. Also when you double-click a IronPython file it is opened by CPython - with its own extension IronPython could execute .ipy scripts.

Of course this doesn't make a whole lot of sense while IronPython doesn't have a well defined home/install directory. It would also be nice to have a lib dir with some standardized wrappers around .NET assemblies. If nothing else at least they could automate the clr.AddReference stuff...

Anyway, yeah - v1.0 is looking really solid. From a 'user' stand point all I'm looking for now is a little more documentation (like where to find and how to decode standard .NET lib docs) and a little nicer packaging.

kitsu wrote  Oct 4 2006 at 1:23 AM  
Wow, the comment thing really mangled my formating...

kitsu wrote  Oct 4 2006 at 3:37 PM  
Anyway, other than Windows file assocciations, you would also need to add the .ipy extension to the list of accepted extensions used while searching sys.path for modules. Addind .ipy would also be nice because it clearly marks which modules are not cross compatable with CPython.

nikie wrote  Oct 31 2006 at 9:43 AM  
Great work!!! I've just added scripting to my .NET application with 1 line of code.

Suggestion: It would really be cool if IronPython came with IDLE-like syntax-highlighting editor and toplevel WinForms-components. I guess many people who use IronPython to add scripting to their applications would have uses for components like that.

mathewww wrote  Nov 9 2006 at 10:55 PM  
The source zip file seems to be corrupt. Its got random characters sprinkled throughout the code.

justizin wrote  Nov 23 2006 at 5:59 PM  
koder wrote: " IronPython does not immediately invoke __del__ methods when del is called on a variable Is this behavior realy acceptable? No one of my program will work correct with this GC. In fact i need explisitly call destructor for each class instance like i call 'delete' in C++." I think this is an instance where you should look to using factories instead of constructors and destructors. If you are calling del, you should consider if your destructor is really garbage collecting, or de-initializing. If the latter, just add a deInitialize() method and call that instead of del. The upside is that now you should be able to run python code in multiple threads at once, and both .NET and Mono, afaik, are using Boehm-Weimers garbage collection, which is also used commonly in C++, ObjC, and is de-facto in Java, Perl, and PyPy, another experimental version of Python which can be targeted to both CIL, C, and possibly C++/ObjC.

FredericTorres wrote  Nov 30 2006 at 1:37 AM  
We have written a first prototype to support IronPython with our functional web testing tool InCisif.net.
Check out my blog, I posted the source code and a small screen cast.
http://blog.incisif.net/2006/11/28/incisifnets-ironpython-prototype.aspx

InCisif.net
Web Testing with C# or VB.NET and soon IronPython

suvetar wrote  Dec 15 2006 at 3:53 PM  
I've added better intellisense implementation (imho!) into IronPython's super console that makes IronPython much simpler for people used to VisualStudio or learning Python ...

How do I submit it ?

jojoba wrote  Feb 22 2007 at 8:49 PM  
does anyone know when ironpython 1.1 will be added to visual studio...right now it's running ironpython 1.06 something.....?
thanks

steps3d wrote  Mar 1 2007 at 9:08 AM  
Have checked IronPython on Python Cookbook code ?
It will be very interesting to see how much of book's code works.

SimonTeW wrote  Mar 30 2007 at 1:07 AM  
Any chance of starting up a discussion forum for those of us allergic to mailing lists? Having recently started using IronPython I have plenty of questions but there's no way in these spam-filled days I would ever subsribe to a mailing list again. (In case you think I'm being precious, at my last job I was getting up to 400 spam emails in my inbox a day, and that was despite the spam filters on the firewall. Now no-one, not even my wife or mother, get my work email address.)

gfrank wrote  May 7 2007 at 3:32 PM  
I'm looking for a way to use NumPy in IronPython. Has anyone figured out a wrapper or some technique to use it? The powerful matrix object in NumPy is what makes Python so appealing for scientific computing (if you don't believe me check out the May/June 2007 issue of "Computing in Science & Engineering" published by The IEEE Computer Society (all about Python)).

egtorresx wrote  Jul 6 2007 at 2:37 PM  
I'm using IronPython on linux, and there is a problem on the console, every time that i hit Backspace the cursor jump three lines above, I don't know if Microsoft is thinking on Linux users too.

pretus wrote  Jul 6 2007 at 7:05 PM  
gfrank, have you got any answer with this respect? I guess that if this is not possible with IronPython, it becomes very limited. There is a huge amount of Cpython code wrapping Fortran and C code that are very important.

stimpy77 wrote  Jul 24 2007 at 8:02 AM  
Besides Python syntax (familiarity for the Python crowd), what is the practical advantage of Python over PowerShell? Or vice-versa?

stephenzr wrote  Aug 27 2007 at 3:35 PM  
Advantage of Python over PowerShell? Excellent question, I just had to answer this for myself this last week. I began writing a script in PowerShell (including learning powershell) to process files and directories. I then realized that the skill's and time used for PowerShell was a bit of a waste. I'm a software developer, not an administrator, so I could better use my times on a real language and real skills versus and administration interface. This could be different for those folks and contractors who will love the PowerShell automation. But for most developers, if you'd rather not compile an executable to simply run a script, Python of any flavor is a great alternative.

rla3rd wrote  Sep 17 2007 at 8:42 PM  
if you want to use numpy in the .net envrionment python for .net http://pythonnet.sourceforge.net/ may be what you are looking for. it acts as a bridge between cpython and the cli

mdw45 wrote  Oct 26 2007 at 12:15 AM  
C++/CLI is a superset of C++, so it might be worth compiling NumPy with C++/CLI. I've never compiled an extension for IronPython, though, so there may be a reason simply re-compiling to CLI won't work from inside IronPython.

-Max

mdw45 wrote  Oct 26 2007 at 12:37 AM  
On second thought, that would probably involve two steps: 1.) writing a CLI wrapper(s) for the .c parts of NumPy and linking the BLAS libraries created in FORTRAN to create a .NET assembly, 2.) tweaking the .py parts of NumPy to use the CLI wrapper(s) you wrote in its basic operations and/or adjusting for semantic differences with CPython. Nontrivial.

-Max

mdw45 wrote  Oct 30 2007 at 6:37 PM  
Also, see this project: http://www.voidspace.org.uk/ironpython/cpython_extensions.shtml
It's trying to solve the general problem of interfacing C extensions to Python with .NET, but running scripts with Numpy objects unmodified in IronPython is an initial goal.

james_027 wrote  Nov 9 2007 at 1:09 AM  
is there a discussion group where I can post my questions about IronPython?

chengjing wrote  Jan 9 at 8:26 AM  
hi :
when i let decimal * decimal , pythonEngine throw unsupport op "*" .

juanmanuel wrote  Jan 23 at 11:06 PM  
Is the statement volatile valid in IronPython y how i use ?

crossbet wrote  Feb 21 at 1:38 AM  
How to use PythonThread in .net2005?Pls give me a Sample,TKS.

w3stfa11 wrote  Mar 20 at 11:49 PM  
Could someone tell me how the name IronPython was chosen? Specifically the Iron part. Just for curiosity's sake. :)

muh_samir wrote  May 28 at 2:19 AM  
About the name, I don't know what's the origin of the name, but I really prefer changing it to some thing that is easier and gives indication (ex -> Py# ).

Kiwi wrote  May 28 at 12:01 PM  
Hi,

After trying to install IronPython, I open my visual studio 2008 (orcas), and indeed, there is a new field "ironPython" a window of new projects.

That said, I can only make WPF applications (as in the studio ironpython):
http://img249.imageshack.us/my.php?image=wpfonlyjb9.png

While on one of their video tutorial, they have more option:
http://img249.imageshack.us/my.php?image=alloptionsku3.png

How to correct this problem? : /

Thank you in advance for the attention brought to my message.

gpjt wrote  Jun 17 at 11:53 PM  
Re: numpy - the project mdw45 referred to above to get it working under IronPython (along with all of the other Python C extensions) is called Ironclad; here's a link to the core project page: http://www.resolversystems.com/documentation/index.php/Ironclad

MartinMapp wrote  Jun 27 at 11:01 AM  
Can IronPython import precompiled modules? I get "No module named xyz" when I try to import a precompiled python dll called xyz.dll using "import xyz". When I do the same thing with other Python compilers I get no probelms.

Updating...