[Python-Dev] Does Zip Importer have to be Special?

2014-07-24 Thread Phil Thompson
I have an importer for use in applications that embed an interpreter that does a similar job to the Zip importer (except that the storage is a C data structure rather than a .zip file). Just like the Zip importer I need to import my importer and add it to sys.path_hooks. However the earliest

Re: [Python-Dev] Does Zip Importer have to be Special?

2014-07-24 Thread Brett Cannon
On Thu Jul 24 2014 at 1:07:12 PM, Phil Thompson p...@riverbankcomputing.com wrote: I have an importer for use in applications that embed an interpreter that does a similar job to the Zip importer (except that the storage is a C data structure rather than a .zip file). Just like the Zip

Re: [Python-Dev] Does Zip Importer have to be Special?

2014-07-24 Thread Phil Thompson
On 24/07/2014 6:48 pm, Brett Cannon wrote: On Thu Jul 24 2014 at 1:07:12 PM, Phil Thompson p...@riverbankcomputing.com wrote: I have an importer for use in applications that embed an interpreter that does a similar job to the Zip importer (except that the storage is a C data structure rather

Re: [Python-Dev] Does Zip Importer have to be Special?

2014-07-24 Thread Brett Cannon
On Thu Jul 24 2014 at 2:12:20 PM, Phil Thompson p...@riverbankcomputing.com wrote: On 24/07/2014 6:48 pm, Brett Cannon wrote: On Thu Jul 24 2014 at 1:07:12 PM, Phil Thompson p...@riverbankcomputing.com wrote: I have an importer for use in applications that embed an interpreter that

Re: [Python-Dev] Does Zip Importer have to be Special?

2014-07-24 Thread Nick Coghlan
On 25 Jul 2014 03:51, Brett Cannon br...@python.org wrote: The problem with all of this is you are essentially asking for a hook to let you have code have access to the interpreter state before it is fully initialized. Zipimport and the various bits of code that get loaded during startup are