Forum: Poser - OFFICIAL


Subject: Python debugger from inside Poser

ElZagna opened this issue on Jul 11, 2011 ยท 21 posts


ElZagna posted Sat, 16 July 2011 at 12:25 PM

I think (I think) I'm beginning to understand this Python-Poser thing and why something that should be so simple is so darn hard. Keep in mind that everything that follows is just my understanding up to this point. I'm hoping tha Millinghost and others will point out any errors.

First a little about Python. Python is open-source which means that anybody can potentially add to it. The native functionality of Python is quite limited which is why almost all Python scripts begin with a series of "import" statements. These imports load modules that contain code to handle, for example, operating system commands (import OS), variable typing (import types), string manipulation (import str), etc. In most cases there is no "official" module for anything, rather there are "de facto" standards. IDLE, for example, is often referred to as the de facto IDE (Interactive Development Environment) for Python, and IDLE is what is typically used to access the debugger for Python.

TkInter is the de facto standard module for visual UI elements such as drop-down lists, command buttons, pop-up windows, etc.; however, Poser chose to use a set of WX modules for this. This means that anything that relys on TkInter for its visual components is not going to work from within Poser. IDLE is based on TkInter.

So... You need to understand that when you are running Python scripts from within Poser, you are working a very different environment than when you are running Python as a standalone.

Finally, the Poser modules (apparently) are wrapped up inside the Poser.exe, so you can't just have an "import Poser" statement to bring those classes, methods, etc. into an ordinary Python script.

Given all that, it seems like we're going to be stuck with debugging via print statements just like I was doing back in the 80s.



OS: Windows 10 64-bit, Poser: 10