Package / Module Hierarchy question

Torsten Mohr tmohr at
Sun Jan 4 22:10:42 CET 2009


in a package i use these files:

module (dir)
  submodule defines a class that derives from a class defined in submodule (and by that in submodule/

Is it possible somehow to write in to import submodule (though is in the same directory as ?

I'd like to keep the tests for within, the code that i want to
execute when i directly execute and then:

if __name__ == '__main__':

Or do i need to write an external test code?

Thanks for any hints,

More information about the Python-list mailing list