[PyQt] pyqtdeploy: howto add egg's?
Schluchti
schluchti at gmail.com
Thu Feb 4 13:47:43 GMT 2016
Hi Phil,
I figured out, that I could just add the corresponding *.so to the resources
qrc.
The *.so should get loaded with the following code snippet (in _AES.py):
def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkgutil, imp
__file__ = pkgutil.get_data(__name__,'_AES.cpython-34m.so')
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
However, now I get the following error:
File: ":/Crypto/Cipher/_AES.py", line 20 in __bootstrap__
TypeError: 'NoneType' object is not callable
At first I thought, that the *.so filename was just wrong and therefore, I
got the NoneType Error, so
I changed the filename in _AES.py to something other like 'test.so'.
Surprisingly, now, I get a different error message than before:
File ":/pkgutil.py" line 629, in get_data
ImportError: qrcimporter: error opening file :/Crypto/Cipher/test.so
Ok, so the filename should be fine, right? I googled a little bit, and found
the following statement in the pkgutil documentation: "If the package cannot
be located or loaded, or it uses a PEP 302 loader which does not support
get_data(), then None is returned.". Is it possible, that get_data() is not
implemented in the pyqtdeploy loader or am I doing something completely
wrong?
Bernhard
--
View this message in context: http://python.6.x6.nabble.com/pyqtdeploy-howto-add-egg-s-tp5183056p5183143.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list