Re: Problems with import of modules

2006-01-26 Thread Ilias Lazaridis
the sys.path.append has done the work. thanks. . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with import of modules

2006-01-23 Thread Carl J. Van Arsdall
Ilias Lazaridis wrote: > I am within a directory > > \doc\template\ > > I launch script.py > > within this script.py, I like to import a module from the doc directory. > > this here does not work: > > form ..\..\module_name import this_one > Well, if you are in linux you can do this easily by ch

Re: Problems with import of modules

2006-01-23 Thread Farshid Lashkari
> How can I modify the python search-path from within the script, thus it > contains the doc directory? Hi, The sys.path variable is a list of strings that contains the current module search path. You can add your own path to this list: import sys sys.path.append('../') -Farshid -- http://ma

Problems with import of modules

2006-01-23 Thread Ilias Lazaridis
I am within a directory \doc\template\ I launch script.py within this script.py, I like to import a module from the doc directory. this here does not work: form ..\..\module_name import this_one how do I go back in the directory hierarchy to import something? If this is not possible: How ca