Re: import relative (with a directory)

2009-01-10 Thread Kay Schluehr
On 11 Jan., 03:27, Chris Rebert wrote: > You should probably check out the relative import syntax introduced in > PEP 328:http://www.python.org/dev/peps/pep-0328/ > It should be able to do exactly what you want. This should exactly lead to exceptions in all of his demo code because the modules a

Re: import relative (with a directory)

2009-01-10 Thread Chris Rebert
On Sat, Jan 10, 2009 at 6:11 PM, rocky wrote: > Import relative? > > Recently for fun I've been working on a large Python program. It has > many files/modules spread over several directories/submodules. > > Each module has some "demo" code at the end that I can use to run or > experiment with that

import relative (with a directory)

2009-01-10 Thread rocky
Import relative? Recently for fun I've been working on a large Python program. It has many files/modules spread over several directories/submodules. Each module has some "demo" code at the end that I can use to run or experiment with that module. Of course, modules often refer to others; dependin