473,799 Members | 3,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2302
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******@nowhe re.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
5373
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), acgr.group_code, bank.local_acc_no, bank.short_name,
0
6706
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 Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
6
2934
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 this, and came across a problem that I haven't been able to solve elegantly. The problem is to find "linker" vertexes that a pair of verteces from a pre-defined set. For example, if the graph verteces represent cities and edges represent flights...
121
10188
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 support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
9
3081
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 to appear in the report is Yes, No, or Maybe. What do I need to do to change what appears in the report/what term do I need to search out in Google? Thank you Colin
47
3544
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, const Bytef *source, uLong sourceLen); It is meant to be called by C, but I would rather use it from C#. So I wrote the following C# program to test it, but it failed to work. The call to compress doesn't return or throw an exception, it simply...
1
7355
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 whatever they want ... i dont need to do any special formatting just a straigh ot pivot tables usign sql server, asp.net, vb.net, OWC 10
0
9218
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 this guide http://java.sun.com/j2se/1.4.2/docs/guide/idl/tutorial/jidl2machines.html to run the orb and server on one machine and the client on another machine it doesn't work.
0
2044
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 the same windows user successfully and browse through the entire tree successfully. The error is as below
0
2198
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): frame = inspect.currentframe() try: function = inspect.getframeinfo(getframe)
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10029
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.