[issue24960] Can't use lib2to3 with embeddable zip file.
Kirk Sayre added the comment: Here is a more robust version of my local fix for this problem. -- Added file: http://bugs.python.org/file46869/pgen.py ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24960> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24960] Can't use lib2to3 with embeddable zip file.
Kirk Sayre added the comment: I've been fighting with this issue today trying to import networkx in the embedded Python shipped with IDA-Pro. I have implemented a local fix to pgen.py that allows networkx to import and be used in IDAPython scripts. I added a check to see if a .zip archive appears in the path of the file loaded in the constructor and if so I use the zipfile package to open the archived file rather than the standard file open() function. I've uploaded the modified pgen.py in case any one is interested. -- nosy: +kirk.d.sayre versions: +Python 2.7 -Python 3.5 Added file: http://bugs.python.org/file46866/pgen.py ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24960> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com