In <4ea5c1da$0$3708$426a7...@news.free.fr> candide <candide@free.invalid> 
writes:

> For instance, suppose I have a file, say my_file.py, located in the cwd, 
> say /home/candide/ and suppose the module to be imported, say 
> my_module.py, is located in the /home/candide/foo/ directory.

> How my_file.py can import the my_module.py module ?

If PYTHONPATH and/or sys.path contain /home/candide/foo/, then you should
be able to:

  import my_module

Or, if foo/ is a real module (i.e. it contains an __init__.py file), this
should work:

  import foo.my_module

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to