Wed, Nov 20, 4:26 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 Sep 18 2:50 am)

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: Python References


jcarp ( ) posted Fri, 23 March 2001 at 5:19 PM · edited Thu, 14 November 2024 at 7:28 PM

Attached Link: http://www.nmt.edu/tcc/help/pubs/lang.html

I stumbled over this trying to solve a Tkintr puzzlement. The Tkintr reference fills in some gaps in the other documentation for it that I've seen, which more than makes up for the awful, awful font (for trying to read) they've chosen.


Mason ( ) posted Fri, 23 March 2001 at 9:43 PM

Speaking of TKintr, I'm having problems with one of my scripts. I can get a dialog to appear and enter my data but, when I try to rerun the script, poser says it cannot create anymore frames. Am I supposed to use Frame or Toplevel for my main dialog window.


jbrugion ( ) posted Fri, 23 March 2001 at 11:21 PM

Mason- post your script if the stuff below doesn't work. I think I know what your problem is as I ran into something similar. Want to start you script something like this: root=Tk() # rest of script. Use root as master for gui items root.mainloop() If you don't do the root=Tk() and then use root as the master to feed into all your gui items, when you exit the script you basically kill off the Tkinter instance that's running and he next Tkinter call in the next script you run will generate error messages. For example, if you just did a "Label(text="test") you'll kill the Tkinter instance that's running. Instead you want to do a Label(root, text="test"). This way root is feed in to the Label as the master so that when the Label is destroyed the script local instance of Tkinter, generated by the root=Tk(), is destroyed instead of the main instance. If you kill the Tkinter instance you then have to do a Reinitialize Python off the main Poser menu. Hope this helps. P.S. Try: http://www.pythonware.com/library/tkinter/ for the intro to Tkinter and http://www.python.org/doc/life-preserver/ for the Tkinter life preserver


bushi ( ) posted Sat, 24 March 2001 at 12:31 AM

I'd also suggest setting up as much as your script as possible outside of Poser. This is especially true for the TkInter stuff since Poser seems to not handle these types of problems very well. I've been using PythonWin to setup and test the GUI parts of the scripts with just 'pass' stubs in the callback handlers. After all that works, I go back in and add the Poser related code. It has saved me lots of headaches.


bushi ( ) posted Sat, 24 March 2001 at 9:51 PM

jcarp - DLed the docs. They do look very useful. I see what you mean about the fonts. Yuck! If you run across any other little gems, please pass them on. :-)


jcarp ( ) posted Sat, 24 March 2001 at 10:22 PM

bushi -- sure thing. UHHH, I notice I spell 'Tkinter' incorrectly and that Mason found that sort of infectious. It's an annoying word to habitually misspell 'import'-wise, and I beg forgiveness for leading anyone down that road.


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.