0

When I use ipy:

IronPython 2.6.2 (2.6.10920.0) on .NET 4.0.30319.296
>>>import xml

works. When I use Sharpdevelop's python console:

IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.296 (32-bit)
>>>import xml
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named xml

My understanding is that SD installs with a copy of IronPython. So I copied the xml folder from

C:\Program Files\IronPython 2.6 for .NET 4.0\Lib

to

C:\Program Files\SharpDevelop\4.3\AddIns\BackendBindings\PythonBinding\Lib

but it didn't fix the problem. How do I load modules into the version of IronPython that ships with SharpDevelop?

CarbonMan
  • 4,350
  • 12
  • 54
  • 75

1 Answers1

0

To get the import to work I downloaded IronPython 2.7.3 and added the following in the SD Python console:

>>> import sys
>>> sys.path.append(r"C:\Program Files\IronPython 2.7\Lib")

The problem occurs because on install the following:

>>> import sys
>>> print sys.path
['.', '.', 'C:\\Program Files\\SharpDevelop\\4.3\\bin\\Lib', 'C:\\Program Files\\SharpDevelop\\4.3\\bin\\DLLs', 'C:\\Program Files\\SharpDevelop\\4.3\\bin']

But the directory C:\Program Files\SharpDevelop\4.3\bin\Lib does not exist.

CarbonMan
  • 4,350
  • 12
  • 54
  • 75