Tue, Oct 22, 1:39 AM CDT

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: Use askColor (from TkInter) without creating tk() dialog


semidieu ( ) posted Sat, 30 December 2006 at 4:13 PM · edited Mon, 21 October 2024 at 11:39 PM

Don't know if it's clear... but here is what I want to do.

I have created a GUI with the internal Poser interface (using XML). I need to pick a color, so I use in my code:

import tkColorChooser
((red, green, blue),color) = tkColorChooser.askcolor()

But when I do this, it also open a little window with the title "Tk()". This window cannot be closed... Is there a way to use the tkColorChooser without opening this window ?


nruddock ( ) posted Sat, 30 December 2006 at 7:38 PM · edited Sat, 30 December 2006 at 7:39 PM

After a little investigating, I think the only way to avoid the extra frame popping up is to start the Chooser dialog from a Tk app.

That said, the following example shows how the annoying Frame can be killed.

<pre style="background-color:rgb(0,0,0);">

Compare line in red to tkCommonDialog.py (rest of code is the same as Dialog.show from that file).


adp001 ( ) posted Sun, 31 December 2006 at 7:02 AM

This is mutch simpler:

from Tkinter import *
from tkColorChooser import *

root = Tk()
root.iconify()

chooser = Chooser(root)
chooser.show()

The rootwindow is simply "iconified" and reapears if the icon in the taskbar is clicked.




semidieu ( ) posted Sun, 31 December 2006 at 9:13 AM

Thanks a lot !

ADP... good idea too.... but I prefer to kill the Tk() window than iconify it.


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.