Importing files other than *.py

Ed Leafe ed at
Fri Nov 19 01:42:52 CET 2004

On Nov 18, 2004, at 7:21 PM, Carlos Ribeiro wrote:

> However, there is a problem with 'import' from within the code being
> executed; it will look for modules on the directory where the source
> file is located. Thus, if your code tries to import a library from
> your system, it may not find it (even if it was located in the same
> directory where the code that called it via execfile() was). So,
> *before* you call the code, update the sys.path to include any
> directories from where you may need to import stuff.

	I was hoping to name certain files with certain extensions, even 
though they are all 100% Python code. This would make organizing 
simpler, and avoid having to adopt a naming convention for the main 
file name.

> (btw, I've been checking Dabo from time to time. Good to know you're
> making progress!).

	It's pretty exciting. Those who have worked with it are pretty 
enthusiastic! It's great to know that we're not the only ones looking 
for a tool like this!

  Ed Leafe

More information about the Python-list mailing list