By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,676 Members | 2,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,676 IT Pros & Developers. It's quick & easy.

Distutils: blurring the file==module borders

P: n/a

Hello all,

Due to the size of my source, I want to split it up into multiple
files(basically one class in each file), but then I have difficulties with
the directory layout when the modules are installed with distutils.

This is my file layout:

in ./ I have a which has 'packages="foo"'

in ./foo/ I have an and a handful of files named,, and so forth.

The problem is that when installed, in order to reach, say, classB, I need to

import foo.ClassA

var = foo.ClassA.ClassA()

while I want to do var = foo.ClassA()

In other words, the result I want can be achieved by putting all code in The problem is that I would find it horrible to have all code in
one file.

Python have this one-to-one relationship between modules and files; can what I
want somehow be achieved?

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.