Re: Restricting import file lookup for pyd, dll, ...

2006-12-11 Thread Gabriel Genellina
At Monday 11/12/2006 19:11, Bernard Lebel wrote: If by "shortening the PYTHONPATH" you meant having less paths, I hardly see how I could do less than what I do with the pth. All these paths seem to be built in. I mean, delete the ones that actually don't exist. sys.path is a simple list; you

Re: Restricting import file lookup for pyd, dll, ...

2006-12-11 Thread Bernard Lebel
Oops, sorry for the inconsistency. The pth file rather looks like this: d:\bernard\work\workgroups\workgroup_animation\data\scripts d:\bernard\work\workgroups\mt_workgroup\data\scripts d:\bernard\work\workgroups\ts_workgroup\data\scripts \\Linuxserver\ANIMATION\FARM\PYTHON\RELEASE c:\users\blebel\

Re: Restricting import file lookup for pyd, dll, ...

2006-12-11 Thread Bernard Lebel
Hello, It's been almost two months since I last investigated this issue, so now I wish to revive this conversation. To answer some of the questions raised by contributors [Gabriel Genellina] Try to shorten the PYTHONPATH to the really required directories (deleting those locations "that don

Re: Restricting import file lookup for pyd, dll, ...

2006-10-28 Thread Fredrik Lundh
Magnus Lycka wrote: >> That's because I'm using Python through another application, via the >> pywin32 extensions. When that other application starts, it performs >> several thousands of file requests (we're talking 4,500, roughly) in >> the Python installation, locations where there are Python fi

Re: Restricting import file lookup for pyd, dll, ...

2006-10-27 Thread Magnus Lycka
Bernard Lebel wrote: > Hi, > > That's because I'm using Python through another application, via the > pywin32 extensions. When that other application starts, it performs > several thousands of file requests (we're talking 4,500, roughly) in > the Python installation, locations where there are Pyth

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Fredrik Lundh
Bernard Lebel wrote: > That's because I'm using Python through another application, via the > pywin32 extensions. When that other application starts, it performs > several thousands of file requests (we're talking 4,500, roughly) in > the Python installation, locations where there are Python files

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Gabriel Genellina
At Thursday 19/10/2006 23:19, Bernard Lebel wrote: I'm affraid this step has already been done. I was not being pedantic when I said "locations that don't make sense", I *really* meant it. You would have to see the Filemon log! Python searches modules along the directories in sys.path - if you

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
I'm affraid this step has already been done. I was not being pedantic when I said "locations that don't make sense", I *really* meant it. You would have to see the Filemon log! Anyway, then is there a way to tell Python not to look for pyd/dll and others in certain locations? In locations were you

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Gabriel Genellina
At Thursday 19/10/2006 22:38, Bernard Lebel wrote: That's because I'm using Python through another application, via the pywin32 extensions. When that other application starts, it performs several thousands of file requests (we're talking 4,500, roughly) in the Python installation, locations wher

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
Hi, That's because I'm using Python through another application, via the pywin32 extensions. When that other application starts, it performs several thousands of file requests (we're talking 4,500, roughly) in the Python installation, locations where there are Python files, and in some other locat

Re: Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Gabriel Genellina
At Thursday 19/10/2006 18:38, Bernard Lebel wrote: By default, when I import a module in Python, Python looks for pyd, dll, py, then pyw and finally pyc file. In our company we do not use pyd and dll for Python stuff. Is there any chance to disable Python from looking at these? Perhaps a flag w

Restricting import file lookup for pyd, dll, ...

2006-10-19 Thread Bernard Lebel
Hello, Running Python 2.4.0 on Windows. I have run a series of tests using Filemon (SysInternals), which logs the file system requests performed by the computer. By default, when I import a module in Python, Python looks for pyd, dll, py, then pyw and finally pyc file. In our company we do not u