On Wed, 10 Feb 2010 20:00:10 +0100, Marcin Krol <[email protected]> wrote:
> Florian Höch wrote:
>> Hi,
> 
>> What you really want to do is remove the directory where your 
>> application resides from sys.path, while keeping other entries.
> 
> I'm well aware that sys.path should not be empty -- the point is, even 
> if it's empty the packed binary is still doing those damn imports of 
> scripts in current directory and I have no idea how to stop that.

So let me get this straight: you need those Python files to stay in the
same directory of the final executable, but you don't want them to be
imported? Is this correct? 
 
> Apparently they are imported via a way different than sys.path: it's 
> probably that importHook function in pyinstaller.

This is because you're rebinding sys.path to a different list. PyInstaller
takes a reference to sys.path at startup, so it doesn't see your
modification. I agree this is a bug, and I have just committed a patch to
fix it. Try if it helps. 
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to