469,963 Members | 1,885 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Using TCL files in Python ?

I am reasonably new to programming in Python. [Using LINUX]

Up until now I have been using GUI widgets supplied by 'Tkinter' but
starting to realise that Tkinter have limited widgets.

I have been given the lead that I should look at other sources for GUI
widgets - namely TCL.

I have just done a search for 'tcl' files on my 'Fedora 3' installation
and find I have available:

Tix8.1
Tcl8.4
Tk8.4

I have never used TCL code under Python so I assume I can use widgets from
any of these providers ?

Where is a good resource I can use to help understand how to use TCL files
in Python ?

Thanks for your help.

Pete

Jul 19 '05 #1
3 1945
In article <pa***************************@optushome.com.au> ,
Peter Moscatt <pg*******@optushome.com.au> wrote:
I am reasonably new to programming in Python. [Using LINUX]

Up until now I have been using GUI widgets supplied by 'Tkinter' but
starting to realise that Tkinter have limited widgets.

I have been given the lead that I should look at other sources for GUI
widgets - namely TCL.

I have just done a search for 'tcl' files on my 'Fedora 3' installation
and find I have available:

Tix8.1
Tcl8.4
Tk8.4

I have never used TCL code under Python so I assume I can use widgets from
any of these providers ?

Where is a good resource I can use to help understand how to use TCL files
in Python ?

Jul 19 '05 #2
While I've never used it, there *is* a Tix module in Python which
appears to wrap the widgets provided by Tix. In Fedora Core 2, Python
doesn't seem to be configured to use Tix OOTB but a one-liner (that
should be harmless elsewhere) does make it work.

These classes are defined in the Tix module:
['Shell', 'Meter', 'TixSubWidget', 'ExFileSelectDialog',
'NoteBookFrame', 'DirSelectDialog', 'Control', 'LabelEntry',
'ButtonBox', 'ScrolledTList', 'Select', 'HList', 'Balloon', 'PopupMenu',
'DirSelectBox', 'ComboBox', 'ScrolledWindow', 'Grid', 'CheckList',
'DialogShell', 'Tree', 'DirList', 'ResizeHandle', 'NoteBook',
'ListNoteBook', 'ScrolledGrid', 'FileEntry', 'ScrolledHList', 'DirTree',
'OptionMenu', 'ScrolledText', 'LabelFrame', 'FileSelectBox',
'ScrolledListBox', 'InputOnly', 'PanedWindow', 'StdButtonBox',
'FileSelectDialog', 'CObjView', 'ExFileSelectBox', 'TList']

Here's what I did to get a simple Tix widget to work:
import Tkinter, Tix
t = Tkinter.Tk()
t.tk.call("package", "require", "Tix") '8.1.8.4' u = Tix.ComboBox(t)
for i in range(30): u.insert("end", "Item %d" % i) ... u.pack()


Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCgfjuJd01MZaTXX0RAsP6AJ9V0HWPVBm73dWl4wUwhc TftNQ7qACfQupx
GkW+1zRYrVTXQmHDk18CBZU=
=8lbS
-----END PGP SIGNATURE-----

Jul 19 '05 #3
Many thanks to all who have helped me out on this one - much appreciated.

Pete

On Wed, 11 May 2005 07:22:09 -0500, Jeff Epler wrote:
While I've never used it, there *is* a Tix module in Python which
appears to wrap the widgets provided by Tix. In Fedora Core 2, Python
doesn't seem to be configured to use Tix OOTB but a one-liner (that
should be harmless elsewhere) does make it work.

These classes are defined in the Tix module:
['Shell', 'Meter', 'TixSubWidget', 'ExFileSelectDialog',
'NoteBookFrame', 'DirSelectDialog', 'Control', 'LabelEntry',
'ButtonBox', 'ScrolledTList', 'Select', 'HList', 'Balloon', 'PopupMenu',
'DirSelectBox', 'ComboBox', 'ScrolledWindow', 'Grid', 'CheckList',
'DialogShell', 'Tree', 'DirList', 'ResizeHandle', 'NoteBook',
'ListNoteBook', 'ScrolledGrid', 'FileEntry', 'ScrolledHList', 'DirTree',
'OptionMenu', 'ScrolledText', 'LabelFrame', 'FileSelectBox',
'ScrolledListBox', 'InputOnly', 'PanedWindow', 'StdButtonBox',
'FileSelectDialog', 'CObjView', 'ExFileSelectBox', 'TList']

Here's what I did to get a simple Tix widget to work:
import Tkinter, Tix
t = Tkinter.Tk()
t.tk.call("package", "require", "Tix") '8.1.8.4' u = Tix.ComboBox(t)
for i in range(30): u.insert("end", "Item %d" % i) ... u.pack()


Jeff


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Carl Waldbieser | last post: by
3 posts views Thread by Kay Lee | last post: by
1 post views Thread by Chris | last post: by
reply views Thread by Richard Taylor | last post: by
5 posts views Thread by Michael Sperlle | last post: by
true911m
4 posts views Thread by true911m | last post: by
4 posts views Thread by Chris Nethery | last post: by
reply views Thread by Albert-jan Roskam | last post: by
reply views Thread by rajasankar | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.