run python from a tcl/tk GUI
SunX
xiaohua_sun at yahoo.com
Sat Oct 9 18:37:10 EDT 2004
mfuhr at fuhr.org (Michael Fuhr) wrote in message news:<4166267e_2 at omega.dimensional.com>...
> 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?
Sorry I forgot to mention that it was on windows. But found out that
one way to do this is "exec ~/python.exe myScript.py".
More information about the Python-list
mailing list