When my IronPython program gets to the line
import wx
I get this message:
A first chance exception of type
'IronPython.Runtime.Exceptions.PythonImportErrorException' occurred in IronPython.dll
Additional information: No module named _core_
although I do have the file wx\_core_.pyd. Also, before attempting the import, I have the lines:
sys.path.append('c:\\Python24\\Lib\\site-packages')
sys.path.append('c:\\Python24\\Lib\\site-packages\\wx-2.6-msw-unicode')
sys.path.append('c:\\Python24\\Lib\\site-packages\\wx-2.6-msw-unicode\\wx')
sys.path.append('c:\\Python24\\Lib\\site-packages\\wx-2.6-msw-unicode\\wx\\lib')
sys.path.append('c:\\Python24\\Lib\\site-packages\\wx-2.6-msw-unicode\\wxpython\\lib')
sys.path.append('c:\\Python24\\Lib\\site-packages\\wxaddons')
which I hoped would let IronPython find everything it needed.
No, this won't work. Wx bindings (like most other "python bindings") are actually compiled against CPython.
In this regards they are not just packages on sys.path to be found, as you have tried. They actually depend on CPython itself. This rather dry document explains the process.
Note: There was a mission by some of the crew at Resolver Systems to allow you to use CPython bindings with IronPython (called IronClad) but this is in its early stages, and I think they will concentrate on getting things like Numpy working first, GUI toolkits will always be the last, and hardest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With