473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2044
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results....
3
by: Kay Lee | last post by:
Hi, I looked up os module to find out some method to move and copy files in python, but os doesn't support such methods. Is there any way to move & copy files in python? Thanks in adv.
1
by: Chris | last post by:
I need to monitor a bunch of files to see what is being opened, read, and closed, with no modifications being made. This is being done first on Windows machines, and later on Solaris. Looking...
0
by: Richard Taylor | last post by:
User-Agent: OSXnews 2.07 Xref: number1.nntp.dca.giganews.com comp.lang.python:437315 Hi I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
10
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and...
4
true911m
by: true911m | last post by:
Here's a little walkthrough to get py2exe up and running. I'm not an expert, so I can't help much with any problems you might have. This is what worked for me. The result here will be to convert...
4
by: Chris Nethery | last post by:
Hello everyone, I have a challenging issue I need to overcome and was hoping I might gain some insights from this group. I am trying to speed up the process I am using, which is as follows: ...
0
by: Albert-jan Roskam | last post by:
Hi John, Thanks! Using a higher xlrd version did the trick! Regarding your other remarks: -yep, input files with multiple sheets don't work yet. I kinda repressed that ;-) Spss outputs only...
0
by: rajasankar | last post by:
Hi, I am using Jython based application and trying to use inspect.py in the python files. Here is my code import inspect,os,sys,pprint,imp def handle_stackframe_without_leak(getframe): ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.