On Thu, 2010-02-11 at 13:17 +0100, Marcin Krol wrote:
> Hello Giovanni,
>
> You're great! It works!
>
> I'm doing:
>
> def lsremove(ls, val):
> try:
> ls.remove(val)
> except ValueError:
> pass
>
> import os
> import sys
>
> lsremove(sys.path, '.')
> lsremove(sys.path, os.getcwd())
> lsremove(sys.path, '')
> print sys.path
>
> After that, no more undesired imports.
I believe this would have worked even before my commit. OTOH, my commit
should make the following work:
sys.path = [p for p in sys.path if p not in ('.',os.getcwd(),'')]
Can you please test it?
> There is still a *small* hole bc I have to import os and sys before I
> can manipulate sys.path. Maybe when I learn how to do __import__ tricks
> I can get around that. Anyway, that solves the practical problem really,
> probability that someone will have "os.py" or "sys.py" script in their
> current directory is very small.
Yes, but since we do agree that this is not a correct solution and just
a temporary workaround until a proper solution is implemented, I believe
that is a good enough compromise.
> Thanks a lot for great work with pyinstaller! I love it!
Thanks! :)
--
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.