[wingide-users] Debugger ignores a project's PYTHONPATH?

Joe Friedrichsen pengi.films at gmail.com
Thu Aug 2 18:03:48 MDT 2007


On 8/2/07, Wingware Support <support at wingware.com> wrote:
> Joe Friedrichsen wrote:
> > I'm working on a small application made up of a one Python script and
> > a few Python modules. The script uses the classes defined in the
> > modules to go about its job. Following the tutorial's advice [1], I
> > created a project for my application and set a custom PYTHONPATH to
> > point to my source tree's module directory as an absolute path
> > (/home/me/src/app/trunk/app/module_name). I'm using distutils to
> > package and install the application, so the layout (cropped for
> > relevance) is:
> >
> > |-- module_name
> > |   |-- mod1.py
> > |   |-- mod2.py
> > |   `-- __init__.py
> > |-- scripts
> > |   `-- script_name
> > `-- setup.py
>
> Hmm, are you sure the path entry shouldn't instead be
> /home/me/src/app/trunk/app (assuming module_name is
> inside app)?
>
> The presence of the __init__.py makes module_name directory into
> a package so you can "import module_name" if you have
> /home/me/src/app/trunk/app on your path.

And that would be the difference between my project and the tutorial.
I re-read it more closely and the tutorial's subdir acts like a single
module and not a package. My modules are grouped as a package, which
means I needed to go one directory up for my PYTHONPATH.

The debugger is working as documented and both the in-IDE shell and
Source Assistant are in-the-know as well.

Thanks for the quick and insightfully tailored response!

Joe


More information about the wingide-users mailing list