Re: path to modules per import statement

2006-03-24 Thread Peter Hansen
AndyL wrote: > [EMAIL PROTECTED] wrote: > I work on rather big set of Python applications: something like 100 .py > files divided into libs and separate sub-applications. > > For now I keep almost everything in one directory but I wish following > structure to be in place: > > app1/ app2

Re: path to modules per import statement

2006-03-24 Thread Fuzzyman
AndyL wrote: > [EMAIL PROTECTED] wrote: > >>For instance: "import my.path.module" would load module from > >>./my/path/module.py? > > > > > > Yeah, just do that. I don't understand the question, it works just like > > this today. > > > > I work on rather big set of Python applications: something l

Re: path to modules per import statement

2006-03-24 Thread AndyL
[EMAIL PROTECTED] wrote: >>For instance: "import my.path.module" would load module from >>./my/path/module.py? > > > Yeah, just do that. I don't understand the question, it works just like > this today. > I work on rather big set of Python applications: something like 100 .py files divided int

Re: path to modules per import statement

2006-03-23 Thread Arne Ludwig
Maybe he means: sys.path.append('/my/path') -- http://mail.python.org/mailman/listinfo/python-list

Re: path to modules per import statement

2006-03-23 Thread [EMAIL PROTECTED]
As an example, let's say you have a main module at /usr/code/Main.py and you have a module you'd like to import at /usr/code/util/Util.py, you can do this: import util.Util If you are using PyDev and Eclipse to develop your Python code, you can set the base directory to reference module imports f

Re: path to modules per import statement

2006-03-23 Thread [EMAIL PROTECTED]
>For instance: "import my.path.module" would load module from >./my/path/module.py? Yeah, just do that. I don't understand the question, it works just like this today. -- http://mail.python.org/mailman/listinfo/python-list

path to modules per import statement

2006-03-23 Thread AndyL
Hi, is there any way to specify the path to modules within import statement (like in Java)? For instance: "import my.path.module" would load module from ./my/path/module.py? Thx, A. -- http://mail.python.org/mailman/listinfo/python-list