A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
discaimer: I dont know any python but I believe IronPython is the managed (CLR) .NET version of the Python language.
Thursday, August 09, 2007
IronPython is Python for .NET. It was written by Jim Hugunin, but is now owned by Microsoft since they took him over. I believe it's pretty compatible with CPython (the original Python implementation) and focuses on .NET interoperability. If you just want to learn Python, go with CPython - the de facto implementation. You can use IronPython if you need .NET interop.
Yeah, you can easly write any kind of application in Python. Check out twisted for client/server, SqlAlchemy for database and Django for web.
Thursday, August 09, 2007
Both are different implementations of the same language.
They are exactly the same language and totally compatible. The only difference is that Ironpython was designed to run on the CLR (.NET Framework), and as such, can interoperate and consume .NET assemblies writen in other .NET languages.
So for learning the language, there's no choice to be made: Python is Python, no matter the implementation.
As for which platform to use as default, all depends on your needs. If you write apps for Windows and .NET is used in your organization, you should consider Ironpython, since this way you can leverage code writen in C#, for example. Also, you can extend python with C# bits for maximum speed when needed.
If you use regular Python (writen in C), you won't be able to use .Net assemblies, but you will have instead a lot of existing libraries that have been in use for a long time.
Hope this helps...
If you use eclipse, you might like PyDev
There is a specific ironpython IDE written in .Net
which sits on top of visual studio.
I used activestate komodo for CPython but really a syntax highlighting editor is enough.
If you want to do GUI apps you can use ironpython with either winforms or WPF or if you need cross platform: wxPython( a port of the wxWidgets cross platfom gui lib to python) or pyQT (a port of the QT library)
These are the instructions for running iron python under visual studio.
You get the regular VS debugger and it compiles the python into an .exe which is rather easier to deploy than the normal python on windows.
If you're in a Windows environment, I highly recommend IronPython over CPython, particularly if you have any prior .NET experience.
For the most part, code is portable between the two. IronPython only gets .NET features if you "import clr" so it's easy to delineate pure Python code from code that depends on .NET. For the most part, the libraries that ship with CPython are compatible with IronPython though a few things don't work (yet) due to CPython relying on undocumented features.
This is all a matter of opinion but, as far as I'm concerned, the .NET Framework classes are vastly superior to the libraries that ship with CPython. The CPython libraries are extensive but a mess. The CPython libraries are a bundle of independently developed pieces of code collected over the years that don't follow any sort of common design guidelines. I try to develop my Python projects as 100% pure Python but end up using a bunch of stuff from .NET simply because it's so much better.
IronPython's evaluation engine is significantly faster than CPython based on the benchmarking tool that ships with CPython. The latest version of IronPython is reportedly twice as fast as CPython. In CPython's defense, CPython's built-in sort is a thing of beauty that destroys IronPython's (which just calls through to .NET's lame Array.Sort as of the last time I checked).
As a bonus, if you develop .NET applications in other languages, it's trivial to integrate IronPython as an evaluation engine. With a few lines of code, you get a Python scripting engine in your application with the objects of your choice easily exposed to the script.
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz