[IronPython] IronPython in Visual Studio 2008
vernondcole at gmail.com
Tue Jan 19 22:17:02 CET 2010
I will try the first part of an answer to your question. It is a long
question, so you will probably get lots of different answers...
There are several different implementations of Python. I will talk about the
two which are most common on Windows systems. I use both.
CPython is implemented in the C++ language and uses the traditional (or OLD,
depending on your point of view) method of operating a Windows program. It
is much more mature, starts up much faster, and has lots of available
modules, including numpy, scipy and countless others. You find it at
http://python.org. <http://python.org%20> To do Windows specific things with
it, you also need pywin32 <http://sourceforge.net/projects/pywin32> . It
can be used on a web server, and several web engines such as django, are
written using it. It cannot be used as a client script on a web page.
IronPython is new, written by Microsoft in the C# language, and uses the new
.NET way of hooking things together. It is a VERY good implementation of
standard Python, but since many of the add-on libraries were written in C++,
not C#, you cannot link to them. There is a package called IronClad which
seeks to make this happen, often successfully. (
http://www.resolversystems.com/products/ironclad/ .) IronPython also suffers
from the frustrating habit of ALL .NET implementations of taking several
seconds (which at times feels like several minutes) to start a new process
running. So while it may often be FASTER than CPython after it finally gets
going, don't even THINK about using it for a quick command-line script. On
the other hand, if you are trying to interface with a new .NET project, it
is only reasonable way to go. It also runs on the Silverlight platform, so
can be used as a scripting language for a web client page, not only a server
I have heard nothing but BAD reports about using Iron Python Studio.
However, there are several Integrated Development Environments which work
with CPython, IronPython, or both. I, personally, use Wing for debugging,
and the IDE which is built in to pywin32 for rough work.
Will Python code run as fast as C, or C++, or C# code? No. (or almost
never.) Will it run fast enough that a human user will never notice the
difference? Almost always. So what you do is prototype in Python, where
you are most productive, then if you find that some part of your system
actually needs the performance boost, you recode that piece in C++ (or C#).
I find that design changes usually do much more to boost perceived speed
than compiler changes do. Python excels at that.
So welcome aboard. You have discovered a great tool.
On Tue, Jan 19, 2010 at 10:22 AM, Vicent <vginer at gmail.com> wrote:
> Hello to all.
> This is my first message to the list. I would like to ask you some basic
> questions about IronPython. First of all, sorry for my English.
> I've just discovered IronPython, and I am actually a new-by in Python, not
> an expert programmer. So maybe you'll find my questions quite simple or
> I read the first chapter of the classic book for IronPython (
> http://www.manning.com/foord/SampleChapter1.pdf), and in pages 7-8 the
> author says:
> "Visual Studio 2008 integration exists in the form of IronPython Studio,
> which is implemented through the Visual Studio Shell extensibility
> framework. IronPython Studio can either be run standalone (without requiring
> Visual Studio to be installed) or integrated into Visual Studio. It includes
> Windows Forms and WPF designers and is capable of producing binary
> executables from Python projects."
> I am very interested in fully understanding this sentence above, because I
> currently use C++ in MS Visual Studio 2008, but I like Python more.
> So, with IronPython + Visual Studio 2008:
> (1) Can I obtain compiled code from Python source, as efficient/fast/etc.
> as if it was made from C++?
> (2) Can I obtain executables (programs that people can install and use, in
> the "normal user" language) as good/fast/efficient as I would obtain using
> Visual C++?
> (3) Can I easily link my Python code with existing external C/C++
> (4) (Similar to the previous one) Can I easily link my Python code with
> some C/C++ source code (I mean, mixing up Python and C in the same project,
> in a transparent way)?
> (5) Can I use NumPy, SciPy and other key (scientific) Python libraries in a
> transparent way?
> (or am I just dreaming??)
> Any answer will be appreciated. Thank you in advance.
> Vicent Giner
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users