In article <b38pvbfjlv...@mid.individual.net>, Martin Schöön <martin.sch...@gmail.com> wrote:
> I know the answer to this must be trivial but I am stuck... > > I am starting on a not too complex Python project. Right now the > project file structure contains three subdirectories and two > files with Python code: > > code > blablabla.py > test > blablabla_test.py > doc > (empty for now) > > blablabla_test.py contains "import unittest" and "import blablabla" > > $PYTHONPATH points at both the code and the test directories. A couple of generic debugging suggestions. First, are you SURE the path is set to what you think? In your unit test, do: import sys print sys.path and make sure it's what you expect it to be. > When I run blablabla_test.py it fails to import blablabla.py Get unittest out of the picture. Run an interactive python and type "import blablabla" at it. What happens? One trick I like is to strace (aka truss, dtrace, etc on various operating systems) the python process and watch all the open() system calls. See what paths it attempts to open when searching for blablabla. Sometimes that gives you insight into what's going wrong. > I have messed around for oven an hour and get nowhere. What temperature was the oven set at?
-- http://mail.python.org/mailman/listinfo/python-list