Python, Tkinter and Tcl (newbie alert)

John Huber r42922 at email.sps.mot.com
Wed May 19 19:12:06 EDT 1999


I've got a couple of questions that will probably expose my ignorace (sorry in advance).

I have a Tcl script (it doesn't use Tk) that runs some test equipmemt (via
GPIB) and sucks in ascii data. The main reason I wrote it in Tcl is that is
what had the GPIB library. Sometime later (recently), I wrote a script for
manipulating some of the acquired data. For no particular reason [*] I chose
to do it in Python. Both things work well, but now, for various reasons, I'd
like to combine them into a single package (without porting one script to the
other language), with a few graphical elements. Tk (Tkinter) seems like a
logical way to do this. 

I could just run the Tcl script using os.system() (I think), but seeing how
Tkinter is so closely related to Tcl, I was wondering:):

When Python uses Tkinter, is it really running a Tcl shell in some form? and
if so, is it possible to execute Tcl code in this shell, something akin to
importing modules?

Thanks,

/John


[*] I don't think these are *good* reasons, but they're the ones I had: Tcl
seems kind of awkward for math stuff; *Everyone* was using Perl, and I wanted
to be different; Perl was driving me nuts with all the @, $ and # symbols (I
kept misplacing/forgetting them); Learning Python seemed like a good path to
try and learn a bit about object-oriented programming.
-- 
John Huber
jhuber at optik.eng.yale.invalid




More information about the Python-list mailing list