[Chicago] import question
Martin Maney
maney at two14.net
Wed Jan 23 15:42:00 CET 2008
On Tue, Jan 22, 2008 at 04:55:59PM -0600, Massimo Di Pierro wrote:
> This does not solve the problem because requires me to edit __init__.py
If that's the chief desiderata, then your solution is to alter sys.path
in the code which imports test to make the existing imports in the test
module work as-is. If you can live with having to edit them once, you
can use relative imports (though that may need another edit down the
road, when Python once again acquires an incompatible change without
changing the major version number... that can be avoided if you don't
care about breaking it for 2.4 right now).
> Moreover other itself imports test.other2 which imports test.other3 etc.
> All files assume that that test is installed.
Lack of proper planning up front often leads to the need to make such
changes. It's agile, baby!
--
...that obsessive conviction, so common among authors and composers,
that all similarities between their works and any others which appear
later must inevitably be ascribed to plagiarism. -- 2nd Circuit, 1945
More information about the Chicago
mailing list