[PyKDE] Python Path in Eric?

Detlev Offenbach detlev at die-offenbachs.de
Fri Mar 17 17:53:46 GMT 2006


Hi,

yes there are two other possibilities.

1. You can set environment variables in the configuration dialog on the 
Debugger->General page.

2. You could create a project for your tests and set project specific debugger 
settings via the Project menu Debugger->Debugger Properties. You can 
configure the IDE to load these settings automatically upon opening a project 
(configuration dialog, Project page).

Detlev

Am Donnerstag, 16. März 2006 21:09 schrieb Paul Waldo:
> Thanks for the reply, Detlev.  That did the trick:
>
> import unittest
> import sys
> sys.path.insert(0, "../src")
> import A
>
> While that certainly gets me testing again, I was hoping that Eric would
> allow me to do that globally.  Is there any setting in the IDE that would
> modify sys.path?  Thanks!
>
> Paul
>
> On Thursday 16 March 2006 1:46 pm, Detlev Offenbach wrote:
> > You could add the following lines to your testcase file (right at the
> > start of the file):
> >
> > import sys
> > sys.path.insert(0, project_root/src)
> >
> > Detlev
> >
> > Am Donnerstag, 16. März 2006 15:59 schrieb Paul Waldo:
> > > Hi all,
> > >
> > > I have a project I'm writing in eric (version 3.7.0).  It has the
> > > following directory structure:
> > >
> > > project_root
> > >     src
> > >         A.py
> > >     tests
> > >         TestA.py
> > >
> > > TestA is a  pyunit test case.  Within it, I want to reference my
> > > classes-under-test by just saying "import A".  If I was doing this from
> > > the command line, I would add "project_root/src" to PYTHONPATH and run
> > > TestA.py from the tests directory.
> > >
> > > When I try to run TestA.py from within Eric, I get an import error when
> > > importing A.  The working directory is set to project_root/src.  How
> > > might I run the test properly?  Thanks in advance!
> > >
> > > Paul
> > >
> > > _______________________________________________
> > > PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> > > http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list