embed Tkinter in C

Will Ware wware at world.std.com
Wed Feb 7 20:19:41 CET 2001

Arvind Mani (marvind at glue.umd.edu) wrote:
> I am planning to build a user interface with Tkinter and integrate it with
> an existing C program.
> Can someone tell me where to find links to Tkinter C API and a tutorial

Tkinter is a Python wrapper for the Tk gui toolkit, which is written in
C and runs on Unix and Windows (and the Mac as well, I believe). If your
program is written in C, you might want to connect directly to the Tk
toolkit. Here's some info on Tk's C API:

A possibly better strategy might be to create a Python wrapper for your
C code, and then write Python code that connects your C code to Tkinter.
This will probably be easier and more maintainable. Some resources that
would be useful for this are the Extending-and-Embedding tutorial:
and Swig, an automatic generator for wrapper code:

import string,time,os;print string.join((lambda x:x[:10]+x[8:])(map(
lambda x:string.center("*"*(lambda x:((x<24) ### Seasons Greetings, Will Ware
*(x-3))+3)(x),24),range(1,28, 2))),"\n") ################ wware at world.std.com

More information about the Python-list mailing list