Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Carl Banks
On Mar 6, 1:54 am, Ben Finney wrote: > (Could you please set a valid email address for people to contact you > if necessary?) > > TP writes: > > I would like to prevent the loading of modules in the current > > directory. > > You will, I think, like the new distinction between “absolute” and > “r

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread TP
Benjamin Peterson wrote: > While the solutions given by others in this thread will work, I think it > is best policy to not name your own modules after stdlib ones. When I see > "os" referenced in code, I assume it is the stdlib one, and don't want to > be confused by the presence of your own modu

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Benjamin Peterson
TP Paralleles.invalid> writes: > > Hi everybody, > > I would like to prevent the loading of modules in the current directory. > For example, if I have a personal module in the current directory > named "os", when I do "import os", I would like Python to import os > standard module, not my perso

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Ben Finney
(Could you please set a valid email address for people to contact you if necessary?) TP writes: > I would like to prevent the loading of modules in the current > directory. You will, I think, like the new distinction between “absolute” and “relative” imports http://www.python.org/dev/peps/pep-0

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread TP
Ben Finney wrote: > (Could you please set a valid email address for people to contact you > if necessary?) Thanks a lot for your help. My email address is in my signature: -- python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\ 9&1+,\'Z4(55l4('])" "When a distinguished but elderly

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Christian Heimes
TP schrieb: > Hi everybody, > > I would like to prevent the loading of modules in the current directory. > For example, if I have a personal module in the current directory > named "os", when I do "import os", I would like Python to import os > standard module, not my personal module of the curren

Re: how to prevent python import from looking into the current directory

2009-03-06 Thread Chris Rebert
On Fri, Mar 6, 2009 at 1:33 AM, TP wrote: > Hi everybody, > > I would like to prevent the loading of modules in the current directory. > For example, if I have a personal module in the current directory > named "os", when I do "import os", I would like Python to import os > standard module, not my

how to prevent python import from looking into the current directory

2009-03-06 Thread TP
Hi everybody, I would like to prevent the loading of modules in the current directory. For example, if I have a personal module in the current directory named "os", when I do "import os", I would like Python to import os standard module, not my personal module of the current directory. Is this pos