Python packages - problems, pitfalls.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Mon Nov 5 07:59:58 EST 2001
hi,
Thanks for the response atleast I know that I am not the only one who
has had this problem. :)
>>>>> "CE" == Chuck Esterbrook <ChuckEsterbrook at yahoo.com> writes:
CE> In my project, Webware, we did ended up with the multiple
CE> import problem you described. eg, where a module was imported
CE> twice under under "bar" and "foo.bar". This lead to technical
CE> problems that were unacceptable.
CE> At some level, this was related to the current directory of
CE> the process. We solved this by tweaking our app server to make
CE> sure it changed the current directory to the highest level of
CE> our packaging system (despite its existence in a subpackage)
CE> at the very start before any project-specific imports. This
CE> solved it.
[snip]
True, but what if one of your modules did a
os.chdir('some_other_dir')? Would this approach still work?
prabhu
More information about the Python-list
mailing list