Re: Does __import__ require a module to have a .py suffix?

2008-03-18 Thread Gabriel Genellina
En Wed, 12 Mar 2008 18:02:54 -0200, Jean-Paul Calderone <[EMAIL PROTECTED]> escribió: > On Wed, 12 Mar 2008 12:58:33 -0700 (PDT), George Sakkis > <[EMAIL PROTECTED]> wrote: >> On Mar 12, 12:22 pm, mrstephengross <[EMAIL PROTECTED]> wrote: >> >>> Hi all. I've got a python file called 'foo' (no

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Jean-Paul Calderone
On Wed, 12 Mar 2008 12:58:33 -0700 (PDT), George Sakkis <[EMAIL PROTECTED]> wrote: >On Mar 12, 12:22 pm, mrstephengross <[EMAIL PROTECTED]> wrote: > >> Hi all. I've got a python file called 'foo' (no extension). I want to >> be able to load it as a module, like so: >> >> m = __import__('foo') >>

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread George Sakkis
On Mar 12, 12:22 pm, mrstephengross <[EMAIL PROTECTED]> wrote: > Hi all. I've got a python file called 'foo' (no extension). I want to > be able to load it as a module, like so: > > m = __import__('foo') > > However, the interpreter tells me "No module named foo". If I rename > it foo.py, I can

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread John Krukoff
On Wed, 2008-03-12 at 09:22 -0700, mrstephengross wrote: > Hi all. I've got a python file called 'foo' (no extension). I want to > be able to load it as a module, like so: > > m = __import__('foo') > > However, the interpreter tells me "No module named foo". If I rename > it foo.py, I can indee

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Rick Dooling
On Mar 12, 11:22 am, mrstephengross <[EMAIL PROTECTED]> wrote: > Hi all. I've got a python file called 'foo' (no extension). I want to > be able to load it as a module, like so: > > m = __import__('foo') > > However, the interpreter tells me "No module named foo". If I rename > it foo.py, I can i

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread Michael Wieher
2008/3/12, mrstephengross <[EMAIL PROTECTED]>: > > Hi all. I've got a python file called 'foo' (no extension). I want to > be able to load it as a module, like so: > > m = __import__('foo') > > However, the interpreter tells me "No module named foo". If I rename > it foo.py, I can indeed import i

Does __import__ require a module to have a .py suffix?

2008-03-12 Thread mrstephengross
Hi all. I've got a python file called 'foo' (no extension). I want to be able to load it as a module, like so: m = __import__('foo') However, the interpreter tells me "No module named foo". If I rename it foo.py, I can indeed import it. Is the extension required? Is there any way to override th