python24.zip

Steve Holden steve at holdenweb.com
Sun May 22 09:14:43 EDT 2005


Robin Becker wrote:
> Dieter Maurer wrote:
[...]
> 
> I think this was my intention, but also I think I have some concern over
> having two possible locations for the standard library. It seems non pythonic
> and liable to cause confusion if some package should manage to install
> python24.zip while I believe that python24\lib is being used.
> 
> 
>>I recently analysed excessive import times and
>>saw thousands of costly and unneccesary filesystem operations due to:
>>
>>  *  long "sys.path", especially containing non-existing objects
>>
>>     Although non-existent, about 5 filesystem operations are
>>     tried on them for any module not yet located.
>>
>>  *  a severe weakness in Python's import hook treatment
>>
>>     When there is an importer "i" for a path "p" and
>>     this importer cannot find module "m", then "p" is
>>     treated as a directory and 5 file system operations
>>     are tried to locate "p/m". Of course, all of them fail
>>     when "p" happens to be a zip archive.
>>
>>
>>Dieter
> 
> 
> I suppose that's a reason for eliminating duplicates and non-existent entries.
> 
There are some aspects of Python's initialization that are IMHO a bit 
too filesystem-dependent. I mentioned one in

 
http://sourceforge.net/tracker/index.php?func=detail&aid=1116520&group_id=5470&atid=105470

but I'd appreciate further support. Ideally there should be some means 
for hooked import mechanisms to provide answers that are currently 
sought from the filestore.

regards
  Steve
-- 
Steve Holden        +1 703 861 4237  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/




More information about the Python-list mailing list