ElZagna opened this issue on Jul 11, 2011 · 21 posts
millighost posted Tue, 12 July 2011 at 6:53 AM
Quote - I've been trying to walk through some Python scripts with the debugger, but I'm having no luck. From what I can tell, Python can't access the poser module unless you're working from within Poser itself, and I can't see how to find and run a script when I invoke the Python shell inside Poser.
So what's the best practice for running the Python debugger with Poser?
Within the scripts-menu there is a python console. You can use it to run an interactive python shell. For running the debugger, you would use (as usual):
>>> import pdb
You can use the execfile function to debug a script, i.e.:
>>> pdb.run ("execfile ('myscript.py')")
assuming the script is in the current directory (otherwise use os.chdir())