Wed, Jan 22, 9:52 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Using Eclipse with Poser -- how to import Poser module


Amadan ( ) posted Sun, 12 April 2009 at 12:25 AM · edited Sat, 10 August 2024 at 8:06 AM

I'm just getting started with PoserPython. I'm an experienced programmer, but fairly new to Python and completely new to PoserPython.

I've read the tutorial on using the IDLE debugger from within Poser, but I'm wondering whether anyone has tried using Eclipse's Pydev in conjunction with Poser? I'd like to use the Eclipse debugger.

Where is the Poser module located? I can't seem to find it anywhere in Poser's file structure, so I am guessing it is a binary accessed internally by the application?


nruddock ( ) posted Sun, 12 April 2009 at 4:56 AM

Quote - Where is the Poser module located?
I can't seem to find it anywhere in Poser's file structure, so I am guessing it is a binary accessed internally by the application?

You're correct, it's inside the Poser executable, and isn't available to external tools.

Have you managed to get idle working from within Poser, if so which version ?
Everything I've tried points to threading not working.


adp001 ( ) posted Sun, 12 April 2009 at 5:11 AM · edited Sun, 12 April 2009 at 5:17 AM

IDLE is not a debugger. It's an IDE for Python, able to set Breakpoints used with Python modul pdb (yes, the debugger is simply a standard Python modul).

Eclipse does exactly the same.

Check http://docs.python.org/library/pdb.html for a description of pdb.

<pre style="padding:.5em;margin-left:2em;background-color:rgb(224,224,224);color:rgb(0,0,0);">

pdb.py can also be invoked as a script to debug other scripts.  For example:

<strong>python -m pdb myscript.py</strong>

When invoked as a script, pdb will automatically enter post-mortem debugging if the 
program being debugged exits abnormally. After post-mortem debugging (or after normal 
exit of the program), pdb will restart the program. Automatic restarting preserves 
pdb’s state (such as breakpoints) and in most cases is more useful than quitting the 
debugger upon program’s exit. 
  

You are right: Posers Python lib is a static piece of code once loaded if Poser is started. There is no re-initializing or reloading, exept if you request "reinitialize Python" from Posers Menu.

Edit:

Don't forget to check http://docs.python.org/library/bdb.html. Modul bdb is used to handle Pythons breakpoints and such.




Amadan ( ) posted Sun, 12 April 2009 at 2:39 PM

Yeah, I know IDLE is an IDE -- I meant I wanted to be able to debug a PoserPython script as it runs from within Poser. Apparently this can be done with IDLE, if you follow the tutorial instructions to make it run within Poser, which I haven't done yet since it seems to require using an older version of Python. I was hoping it might be possible to do the same with Eclipse.

As an IDE, Eclipse is a lot more convenient since I can just link my Pydev project to the PoserPython file structure, and Eclipse is much more full-featured than IDLE. But I guess I'll have to do debugging the hard way. Ah well.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.