Wrox Home  
Search P2P Archive for: Go

  Return to Index  

python thread: GUI ?


Message #1 by "spyyder" <spyyder@i...> on Wed, 29 Aug 2001 11:55:41 +0530
Python has bindings for several different GUI toolkits, and it can create a
graphical user interface on almost any system (Windows, Linux/Unix, Mac,
etc.).  The standard toolkit is Tkinter which is really just a set of
Python bindings for Tcl/Tk.  Another powerful GUI toolkit is wxWindows
which runs on Linux or Windows.  The Python implementation is called
wxPython and can be found at www.wxpython.org.

Most Python distributions come with Tkinter set up already.  To create a
simple GUI and see if it is installed and works, try the following code:

from Tkinter import *
root = Tk()
MyLabel = Label(root, text="Testing 1,2,3")
MyLabel.pack()
root.mainloop()

You can check out an introduction to Tkinter at:
http://www.secretlabs.com/library/tkinter/introduction/index.htm

Also, look at the Python Topic page:
http://www.python.org/topics/tkinter/doc.html

-Blake




                                                                                                                     
                    "spyyder"                                                                                        
                    <spyyder@i...        To:     "Python" <python@p...>                                     
                    times.com>            cc:                                                                        
                                          Subject:     [python] GUI ?                                                
                    08/29/2001                                                                                       
                    02:25 AM                                                                                         
                    Please respond                                                                                   
                    to "Python"                                                                                      
                                                                                                                     
                                                                                                                     



>How and where can u use it in GUI i dont get it in cgi scripts i
understood could u tell me more

>thank you





  Return to Index