run python from a tcl/tk GUI

Michael Fuhr mfuhr at fuhr.org
Fri Oct 8 07:32:46 CEST 2004


xiaohua_sun at yahoo.com (SunX) writes:

> Just wrote a front-end GUI with tcl/tk to take user input.  Want to
> push a button on the GUI to start running a python script.

Is there a reason not to write the entire GUI in Python and use
Tkinter or wxPython?

> I know one can use exec in tcl to run .exe files, but not .py or
> .pyc, correct?

Sounds like a platform-specific issue; since you mention .exe files,
I assume you're running some flavor of Windows.  One can certainly
run .py and .pyc files from a Tcl/Tk script on Unix-like systems.
What does your code look like?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



More information about the Python-list mailing list