Sun, Jan 5, 4:39 AM 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: Debugging Poser Python with PoserPro2010 (it works :)


xuu4u ( ) posted Sat, 27 March 2010 at 5:01 PM · edited Sun, 22 December 2024 at 4:12 AM

Content Advisory! This message contains nudity

file_450239.jpg

Since some days i have PPro2010. I was interested to test wether debugging python code via IDLE is possible under PoserPro2010. The Python version in PoserPro is still Version 2.4.2. So i installed the IDLE Version from the Python 2.2.3 Package. (There is a tutorial of mine in the Poser Tutorials Forum Section how to do this, Search for "IDLE" ) And woha, it works good. i had no more errormsges when closing the IDLE windows. and there was no problem to restart it too.

greetings
xuu4u



xuu4u ( ) posted Mon, 29 March 2010 at 10:25 AM

 Doing some analysis with the integradted IDLE of PoserPro 2010 i found out how to modifiy it,
so it doesnt carsh poser anymore.

The problem that crashes poser has to do with the subprocess for the debugger window.
Theres a lot of code that hast to do with the subprocess and i dont wanna step
in the the details deeper.

to fix this you have to make small change in the file pyshell.py
(if you need a good code editor, try Notepad++, it supports python code
you will find it easyly via google)

To Fix it open 
'Your Poser8 / PoserPro2010 Installation"
runtimepythonlibidlelibpyshell.py

Line 1272 : use_subprocess = True
Replace True to False and save the file.

To Try out open 
'Your Poser8 / PoserPro2010 Installation"
runtimepythonposerscriptsmainbuttons.py

and change for example line 9 to the following
poser.DefineScriptButton(7, ":Runtime:Python:Lib:idlelib:idle.py", "IDLE 1.1.2")

you can then start idle via the Poser Python Scripts Buttons.

Bcause we use IDLE with the No_Subprocess options now
the debugger doesnt follow automticly the codelines if you step or trace through the code.

if you want that feature, you should use the older version (IDLE 0.8 out of the Python 2.3.3 distribution)

greetings 
xuu4u

 



RobynsVeil ( ) posted Sat, 03 December 2011 at 2:38 AM

Is there any documentation on how to use the debug features of IDLE? Or is it all about setting 'print' statements?

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


face_off ( ) posted Wed, 05 August 2015 at 12:23 AM · edited Wed, 05 August 2015 at 12:23 AM

I just tested this on PoserPro2014, and copying the C:/Python27/Lib/idlelib folder into C:/Program Files/Smith Micro/Poser Pro 2014/Runtime/Python/Tools and making the use_subprocess change works!  So thank you!

Unfortunately I could debug a PoserPython Addon, since the are initiated from within Poser rather then the IDLE editor.

Paul

Creator of PoserPhysics
Creator of OctaneRender for Poser
Blog
Facebook


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.