Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does IronPython implement python standard library?

I tried IronPython some time ago and it seemed that it implements only python language, and uses .NET for libraries. Is this still the case? Can one use python modules from IronPython?

like image 305
Nikola Smiljanić Avatar asked Aug 18 '09 21:08

Nikola Smiljanić


2 Answers

The IronPython installer includes the Python standard library. Otherwise, you can use the standard library from a compatible Python install (IPy 2.0 -> CPy 2.5, IPy 2.6 -> CPy 2.6). Either copy the Python Lib directory to the IronPython folder, or set IRONPYTHONPATH.

Do note that only the pure Pyton modules will be available; Python modules that require C extensions have to be re-implemented (and most of them have been).

like image 76
Jeff Hardy Avatar answered Nov 12 '22 06:11

Jeff Hardy


You can use the Python standard library from IronPython just fine. Here's how:

  1. Install Python.
  2. Setup an environment variable named IRONPYTHONPATH that points to the standard library directory.

Next time ipy.exe is run, site.py is read and you're good to go.

like image 4
Justin R. Avatar answered Nov 12 '22 07:11

Justin R.