Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - IronPython dilemma

I'm starting to study Python, and for now I like it very much. But, if you could just answer a few questions for me, which have been troubling me, and I can't find any definite answers to them:

  1. What is the relationship between Python's C implementation (main version from python.org) and IronPython, in terms of language compatibility ? Is it the same language, and do I by learning one, will be able to smoothly cross to another, or is it Java to JavaScript ?

  2. What is the current status to IronPython's libraries ? How much does it lags behind CPython libraries ? I'm mostly interested in numpy/scipy and f2py. Are they available to IronPython ?

  3. What would be the best way to access VB from Python and the other way back (connecting some python libraries to Excel's VBA, to be exact) ?

like image 526
Thomas Geritzma Avatar asked Sep 10 '09 02:09

Thomas Geritzma


People also ask

How is Python different from IronPython?

Python is Python, the only difference is that IronPython was designed to run on the CLR (. NET Framework), and as such, can inter-operate and consume . NET assemblies written in other .

Can IronPython use Python libraries?

IronPython is an open-source implementation of the Python programming language which is tightly integrated with . NET. IronPython can use . NET and Python libraries, and other .

Why do we use IronPython?

IronPython works as an extension to the . NET Framework, but it can also be used by . NET projects to take advantage of Python's scripting power. Other than that, since IronPython is a real implementation of Python itself, there's no need to learn a new language or extra features if you already know Python.

Is IronPython compiled?

IronPython runs on the Microsoft® . NET Framework and supports an interactive console with fully dynamic compilation. It is well integrated with the rest of the . NET Framework and makes all .


1 Answers

1) IronPython and CPython share nearly identical language syntax. There is very little difference between them. Transitioning should be trivial.

2) The libraries in IronPython are very different than CPython. The Python libraries are a fair bit behind - quite a few of the CPython-accessible libraries will not work (currently) under IronPython. However, IronPython has clean, direct access to the entire .NET Framework, which means that it has one of the most extensive libraries natively accessible to it, so in many ways, it's far ahead of CPython. Some of the numpy/scipy libraries do not work in IronPython, but due to the .NET implementation, some of the functionality is not necessary, since the perf. characteristics are different.

3) Accessing Excel VBA is going to be easier using IronPython, if you're doing it from VBA. If you're trying to automate excel, IronPython is still easier, since you have access to the Execl Primary Interop Assemblies, and can directly automate it using the same libraries as C# and VB.NET.

like image 163
Reed Copsey Avatar answered Sep 25 '22 19:09

Reed Copsey