<div dir="ltr"><div><div>I've had a similar problem with a tkinter/3D app. right now I'm looking toward Blender, and the Python API, but there is also wxpython, and the usual python's library gtk. <br><br></div>
There is also matplotlib with the ion window. but, I, personally, am going to go with Blender, and Python API, with maybe a few other imports, and if ctypes...includes if I remember C correctly without reference at this time the usages of returned data type values <br>
for you to utilize.<br><br><br></div>But for the plainer answer I'd go with wxpython if you decide not to use a different library, and for a GDK, Blend<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 16, 2013 at 8:57 PM,  <span dir="ltr"><<a href="mailto:fronagzen@gmail.com" target="_blank">fronagzen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hm. So I've written a GUI in tkinter. I've found two performance issues, I was hoping someone could point me in the right direction.<br>
<br>
Firstly, I'm using an image as a border, namely:<br>
<br>
from tkinter import *<br>
from tkinter import ttk<br>
<br>
root_frame = Tk()<br>
root_frame.configure(background = 'black')<br>
<br>
img1 = PhotoImage("frameBorder", data="""<br>
       R0lGODlhQABAAMIHAAAAABkfLTMrMzMrZjNVZjNVmUFch////ywAAAAAQABAAAAD9A<br>
       i63P4wykmrvTjrzbu/hlGMZGmeaBp2QmgIQSzPdG3fbShk+u3/wFkONAgaj7aBoWIo<br>
       Ip9P5aQFrSJfkpd1C2xluWDfEhIKm2mrh/bM9qrZ8MDYYYiz54263Yxn6PdgfQt/gF<br>
       uCCoSFVYcAiYpPjI6PR5GTVpWWUJiZV2SckJ6flKGiQZulP6eoN6qrNa2uM7CxMbO0<br>
       trG4rrqrvKi+pcCiwp/EnMaZyJbKk8yPzorQhdKA1HuRMLQ0bnSSuYyN2mhZ2eLcD1<br>
       TicjtZ3sPgfu7J8A0EBOWfQxg5a4/87BtcCBxIsKDBgh8SKlzIsKHDhxAVJgAAOw==""")<br>
<br>
style = ttk.Style()<br>
style.element_create("RoundedFrame", "image", "frameBorder",<br>
                                  border=30, sticky="nsew")<br>
style.layout("RoundedFrame", [("RoundedFrame", {"sticky": "nsew"})])<br>
<br>
input_frame = ttk.Frame(root_frame,<br>
                        style = "RoundedFrame",<br>
                        padding = 15,<br>
                        width = 640,<br>
                        height = 180<br>
                        )<br>
input_frame.pack(padx=10, pady=10)<br>
<br>
This works, yes, but is annoyingly laggy on an older computer when I try to move the window around. I figure it's because the program has to keep redrawing the image border when dragged around, and is exacerbated by the fact that I have two of the imageborder frames in my application. How can I remedy this? I've tried using a hard-drawn image on a Canvas instead of the image border, but it's suboptimal because that prevents resizing the window.<br>

<br>
<br>
The other performance issue I've found is that when the logic is running, the app doesn't redraw. Ordinarily this would be acceptable, but as part of my program, it loads data from a website, and during the load, the window completely freezes up and doesn't respond until the download is done; as I understand it, tkinter doesn't redraw until it is forced to by .update() or control is given back to the mainloop. How can I force a more frequent redraw rate?<br>

<span class="HOEnZb"><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br><span style="font-family:arial,helvetica,sans-serif">David Hutto</span><br><i><b>CEO:</b></i> <u><a href="http://www.hitwebdevelopment.com" target="_blank">http://www.hitwebdevelopment.com</a></u><br>

</div>