Python packages - problems, pitfalls.
prabhu at aero.iitm.ernet.in
Mon Nov 5 13:59:58 CET 2001
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.
True, but what if one of your modules did a
os.chdir('some_other_dir')? Would this approach still work?
More information about the Python-list