Subscribe to this thread
Home - General / All posts - Standard libraries in IronPython 2.7
julmou29 post(s)
#23-Oct-23 04:23

Hi,

I have been playing with IronPython in Manifold 9 a little bit. First of all, the system I am using:

Manifold System 9.0.180.0

IronPython 2.7.9 (2.7.9.0) on .NET 4.0.30319.42000 (64-bit)

From the IronPython description here below, I was expecting the Python 2.7 standard libraries would be accessible.

https://docs.python.org/2.7/library/index.html

However, when running a few examples in Manifold, it is clear that some of the standard libraries aren't recognised. See below.

Is there a way to know which libraries are installed/accessible in IronPython in Manifold?

As extra information, I am just using the dll package from this link:

https://manifold.net/updates/download_9.shtml#:~:text=RELEASE%209%20BASE%20PLUS%20%C2%B7%20PORTABLE%20(SELF%2DCONTAINED%20ZIP%20FILE)

rk
645 post(s)
#23-Oct-23 07:37

Yes, it is possible to use python libraries.

Do you have IronPython-2.7.9.msi installed?

https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.9

Then, in your script you have to explicitly add paths to libs.

#python

import sys

sys.path.extend(['C:\\Program Files\\IronPython 2.7\\lib', 'C:\\Program Files\\IronPython 2.7\\lib\\site-packages'])

import json

like here and here.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.