Importing and source structure troubles

Echo oshecho at gmail.com
Fri Jun 3 03:59:25 EDT 2005


Hello,

I am having trouble with putting the source for a program I am working on in 
different directories.
I have the directories set up like this:

dir1
dir2
dir3

I want the source in dir2 to be able to import from the source in dir3(is 
this possible). I get import errors when I tried doing this.

A less preferred structure that I tried was like this:
dir1
dir3
dir2

I thought that this way would work. but this way I get even more import 
errors. two files in dir2 have a 'from dir3.dir2 import bla' however, in one 
of the files, I get an import error. any idea why this is??

What is the best way to structure the program I am working on? I have 3 
groups of source files. One has the files that start the program and some 
tools. Another group has all the main files. And the last group is just some 
misc stuff. How would the best way to accomplish this be?

-- 
-Echo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050603/0803b09a/attachment.html>


More information about the Python-list mailing list