Jean-Michel Pichavant wrote:
__import__('/home/jeanmichel/test')
The __import__ function takes *module* names, not
filesystem pathnames.
Giving it a pathname might happen to work some of
the time in some versions of Python, but it's not
an intended feature, and you shouldn't rely on it.
If y
On Wed, 20 May 2009 22:01:50 +0200
Jean-Michel Pichavant wrote:
> You are right, but my concern is not the relative path resolution. Let
> me clarify:
>
> /home/jeanmichel/test.py:
> "import sys
> print sys.path"
>
> >python.exe test.py
> sys.path = ['/home/jeanmichel']
> > from within a pyt
You are right, but my concern is not the relative path resolution. Let
me clarify:
/home/jeanmichel/test.py:
"import sys
print sys.path"
>python.exe test.py
sys.path = ['/home/jeanmichel']
> from within a python shell:
sys.path = ['']
The unpredictable effect of '' (at least something I did no
In article ,
Jean-Michel Pichavant wrote:
>
>I spent quite a time on a malicious issue. I found out that there is a
>slight difference on the sys.path content when either executing code
>from a shell or from within a script. This difference is the '' item,
>which is present in the shell form of
Hi fellows,
I spent quite a time on a malicious issue. I found out that there is a
slight difference on the sys.path content when either executing code
from a shell or from within a script.
This difference is the '' item, which is present in the shell form of
sys.path.
For instance, let's wr