473,395 Members | 1,756 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,395 software developers and data experts.

Using the C Source Code from Tcl/Tk

Bgc
Hello All,

I've been struggling for years now trying to come up with a solution
to a very personal programming problem with Python. I'm an
educational programmer, and I make applications that are used in
educational environments by nontechnical folks. I therefore need GUIs
that are pretty, easy to use, and cross platform (win, mac, linux,
unix). In my search for a GUI, I've also come to the conclusion that
as much as I love Python, the GUI situation is less than perfect. I
long for the day when I can use the following code on any platform
without worry:

import Gui

That being said, I like Tkinter module. In some cases the Tk widgets
aren't "as good as Windows." In some cases they're much better than
Windows. For example, the Tk text widget allows you to dynamically
highlight text, insert images, insert other widgets, etc., etc. For
someone like me who develops educational programs, the power of the Tk
text widget is invaluable. My guess is that widgets like that are
possible because of the quality of the native C code underlying the
Tcl/Tk interpretive layer. It's supposed to be some of the best C
code ever written.

After looking at Tcl/Tk for a while I considered dropping Python
altogether. Until I looked at Tcl syntax. I think that the Tcl
syntax is the reason that Tcl/Tk is having some popularity problems.
Some would argue that the default Motif widgets are the problem, but
the default look of Tk has improved a lot over the years (and
extensions like PMW really help).

What is interesting right now is that the Tcl/Tk group is talking the
need to revitalize Tcl/Tk:

http://tcl.projectforum.com/tk/Home

So, here the Python group is without a Python-native GUI (the Tkinter
module being a wrapper around Tcl/Tk). And here is the Tcl/Tk group
struggling with the problem of Tcl's popularity (and maybe some of
that is Tk's fault, who knows). And then there is that excellent
cross platform compatible C code sitting at Sourceforge under the BSD
license… The mind boggles… Maybe its time to take the C code
underlying Tcl/Tk and port it for Python-native use without the Tcl/Tk
layer?
Jul 18 '05 #1
4 2287
Bgc
I had a look at Tcl/Tk. And you know what? I like it better than
Python. I'm sick of "bindings" for everything. Tcl/Tk is just
awesome, so why not use it instead? That's what I'm going to do.
What a relief. Sorry if I offended any Tclers with the original post.
I'm very excited, and relieved about my decision.

Steve

What is interesting right now is that the Tcl/Tk group is talking the
need to revitalize Tcl/Tk:

http://tcl.projectforum.com/tk/Home

So, here the Python group is without a Python-native GUI (the Tkinter
module being a wrapper around Tcl/Tk). And here is the Tcl/Tk group
struggling with the problem of Tcl's popularity (and maybe some of
that is Tk's fault, who knows). And then there is that excellent
cross platform compatible C code sitting at Sourceforge under the BSD
license? The mind boggles? Maybe its time to take the C code
underlying Tcl/Tk and port it for Python-native use without the Tcl/Tk
layer?

Jul 18 '05 #2
Bgc
I had a look at Tcl/Tk. And you know what? I like it better than
Python. I'm sick of "bindings" for everything. Tcl/Tk is just
awesome, so why not use it instead? That's what I'm going to do.
What a relief. Sorry if I offended any Tclers with the original post.
I'm very excited, and relieved about my decision.

Steve

What is interesting right now is that the Tcl/Tk group is talking the
need to revitalize Tcl/Tk:

http://tcl.projectforum.com/tk/Home

So, here the Python group is without a Python-native GUI (the Tkinter
module being a wrapper around Tcl/Tk). And here is the Tcl/Tk group
struggling with the problem of Tcl's popularity (and maybe some of
that is Tk's fault, who knows). And then there is that excellent
cross platform compatible C code sitting at Sourceforge under the BSD
license? The mind boggles? Maybe its time to take the C code
underlying Tcl/Tk and port it for Python-native use without the Tcl/Tk
layer?

Jul 18 '05 #3
In article <e9**************************@posting.google.com >, Bgc wrote:
I had a look at Tcl/Tk. And you know what? I like it better than
Python. I'm sick of "bindings" for everything. Tcl/Tk is just
awesome, so why not use it instead? That's what I'm going to do.
What a relief. Sorry if I offended any Tclers with the original post.
I'm very excited, and relieved about my decision.


Heretic!

I suppose going through the tcl interpreter is not an ideal situation, but
it works, and I've seen some pretty amazing things done with Tkinter. I
prefer pygtk, though. Tk is beginning to show its age, though the text and
canvas widgets are still strong points.

Dave Cook
Jul 18 '05 #4
"David M. Cook" <da******@nowhere.net> wrote:
I suppose going through the tcl interpreter is not an ideal situation, but
it works, and I've seen some pretty amazing things done with Tkinter. I
prefer pygtk, though. Tk is beginning to show its age, though the text and
canvas widgets are still strong points.

As an earlier poster mentioned, there is an effort underway to
update Tk and really brush the dust off of it. People who know
Tk can make it look good with a lot of option tweaking and
bringing in third-party widgets, but we'd like to see it work
a bit better right out of the box.

Anyway, as mentioned, more info on this effort is here:
http://tcl.projectforum.com/tk/

As one of the people behind this effort (yeah I use Tcl), we'd
be very happy to see a lot of Python folks involved. Have a peek
at the site, and if you still have questions, post there or please
feel free to email me.

As an aside, many of us in the Tcl community who are doing
professional-level apps have struggled with the choices for a
GUI toolkit, and have calculated that improving Tk is not that
much work, and doing that would be the best alternative for a
fairly large class of development needs. Most of us are pretty
pragmatic and not hugely wedded to Tcl (lots of us like Python
too), though we do like a lot of what Tcl does offer, including
Tk and other goodies.

Mark
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George | last post by:
Hi, I am trying to write a query in Oracle which I have not done before, and are having some difficulty getting my result. Please check my query and my results. select max(note.datetime),...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
47
by: Bonj | last post by:
I downloaded the gzlib library from zlib in order to do compression. (http://www.gzip.org/zlib) The prototype of the compression function seems to be int compress (Bytef *dest, uLongf *destLen,...
1
by: kingster | last post by:
Hi, I have a regular dataset and all i want to do is make a pivot table display in a browser with the datasource of the pivot table to be this dataset and then the end-user will be able to do...
0
by: none | last post by:
I have followed http://java.sun.com/j2se/1.4.2/docs/guide/idl/GShome.html to build a corba application. When i run the orb, server and client on the same machine it works fine. When i follow...
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.