Re: Importing a module from a non-cwd

2011-10-24 Thread John Gordon
In <4ea5c1da$0$3708$426a7...@news.free.fr> candide 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

Importing a module from a non-cwd

2011-10-24 Thread candide
Hi, It's easy to open a file not located in the current working directory (cwd). But how about importing a module? 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/cand