problem with packages and path
marco.bizzarri at gmail.com
Thu Aug 28 10:28:06 CEST 2008
On Wed, Aug 27, 2008 at 6:44 PM, Daniel <daniel.watrous at gmail.com> wrote:
> I'm writing some unit tests for my python software which uses
> packages. Here is the basic structure:
> within alltests.py I would expect to be able to "import
> mypackage.unittests.test1". In fact within PyScripter this works as
> expected. However, when I execute the code from the command line, I
> get the following error:
> ImportError: No module named mypackage.unittests.test1
1) What is the command you're using to run the alltest.py module?
2) what is the result of:
- python -c "import mypackage"
- python -c "import mypackage.unittests"
More information about the Python-list