473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

run python from a tcl/tk GUI

Gurus;
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. I know one
can use exec in tcl to run .exe files, but not .py or .pyc, correct?
Help on how to do this is highly appreciated.
Many thanks
Howard
Jul 18 '05 #1
2 2219
xi*********@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/
Jul 18 '05 #2
mf***@fuhr.org (Michael Fuhr) wrote in message news:<41********@omega.dimensional.com>...
xi*********@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".
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.