[Visualpython-discuss] Problems debugging Modules..
by Michael Collins other posts by this author
Aug 18 2005 10:07AM messages near this date
view in the new Beta List Site
[Visualpython-discuss] swig init function problem
|
Re: [Visualpython-discuss] Problems debugging Modules..
Hi,
I've been asked to download and evaluate the Visual Python Trial for
the company I work for.
Unfortunately it doesn't seem to be going too well so far.
First off, I'm using Visual Studio .Net 2003, it has all microsoft
service packs installed etc.
My workstation is a Windows XP professional machine, again with all
service packs etc. applied.
I already had Python 2.4.1 from python.org installed on my machine,
along with a bunch of python modules including pywin32.
I downloaded the Latest Visual Python, 1.83 from the activestate site.
I have set up a Solution with 2 projects which corresponds to the
directory structure for the python I am trying to debug.
This is the directory stucture roughly
Services __init__.py
ServicesCommon __init__.py
file1.py
file2.py
...
Teams __init__.py
file3.py
file4.py
...
My Solution is Services.sln with 2 projects, ServicesCommon and Teams.
In the a Teams Service in the teams directory I have a this line:
from Services.ServicesCommon.XmlHelper import XmlHelper
Trying to debug one of this program in the Teams modules which refers
to files in the ServicesCommon doesn't work.
I get output like this:
Starting Python debug run ...
Traceback (most recent call last):
File "c:\program files\activestate visual python\callvpython.py ",
line 105, in ?
main(sys.argv[1:])
File "c:\program files\activestate visual python\callvpython.py ",
line 100, in main
else: requestor.start(script_args)
File "c:\program files\activestate visual python\kdbxml.py", line
709, in start
return Requester.start(self, debug_args)
File "c:\program files\activestate visual python\kdbxml.py", line
311, in start
self._do_start(debug_args)
File "c:\program files\activestate visual python\kdbxml.py", line
343, in _do_start
self.kdb.run(code_ob, locals, locals)
File "C:\Python24\lib\bdb.py", line 366, in run
exec cmd in globals, locals
File "c:\michael\code\Services\Teams\Teams_Service.py", line 26, in ?
from MMP_Services.Teams.Teams_Core import Teams
ImportError: No module named MMP_Services.Teams.Teams_Core
If it was a standard vc++ project I would be able to add a dependancy
from Teams to ServicesCommon.
I have tried adding the path to the Services directory, and the
directory below it to the PYTHONPATH environment variable. (Both in
Tools -> Options -> Projects -> VisualPython Python Path in visual
studio, and by setting a windows environment PYTHON_PATH variable)
Using the pyDev Eclipse plugin I create a workspace in Services and am
able to add the ServicesCommon and Teams directory as additional paths
in the pyDev PythonPath.
Running it in pdb from the command line I just start a python session
in the c:\michael\code directory, import pdb, import the module and
start it running.
What really puzzles me is that the context menu when i right lcick on
the import statement in the ide which the debugger is crashing on the
ide can pull up the file which it references.
Any pointers or tips?
Cheers
Michael
_______________________________________________
Visualpython-discuss mailing list
Visualpython-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Michael Collins
Eric Promislow
|