About 1,260,000 results
Open links in new tab
  1. How to make a tkinter button run another python file

    Oct 9, 2019 · You can move the code of the new window to a different python file and import it. For example: import tkinter as tk def open_dialog(): root = tk.Tk() button = tk.Text(root, …

  2. Run One Python Script From Another in Python - GeeksforGeeks

    Sep 16, 2024 · Below are some of the ways by which we can make one Python file run another in Python: Using import Statement; Using exec() Function; Using subprocess Module; Using …

  3. how to make a tkinter button run another python file - YouTube

    Instantly Download or Run the code at https://codegive.com certainly! creating a tkinter button that runs another python file involves a few steps. in this tutorial, i'll guide you...

  4. Running another .py file from tkinter's command button (stuck ... - Reddit

    Mar 20, 2022 · The command= keyword requires a function as an argument, so you could use command = lambda: os.system('ProgramToRun.py') but note that the window will become …

  5. How can I make one python file run another? - Stack Overflow

    execfile('file.py') in Python 2; exec(open('file.py').read()) in Python 3; Spawn a shell process: os.system('python file.py'). Use when desperate.

  6. Button in GUI linked to new python script - Python Forum

    Jan 30, 2021 · If you can do something in Python you can have the button call the Python code that does the something. Starting with a crude way of doing things you could execute a shell …

  7. Linking a tkinter GUI objects to another script - Python Help ...

    Jul 21, 2021 · I have made a GUI in tkinter and it has a few buttons. I would like to call (using uigetfile), select (using uigetfile), and run another python file from that GUI. I haven’t done the …

  8. Open the Python file when you click the button

    Aug 24, 2017 · There are many different ways to call the code from another python file when a button is pressed but the best way will depend on what you want to do and what both of your …

  9. St.button to initiate python file the way streamlit run then python ...

    Dec 16, 2022 · I have a python code where I want to create a st.button to be clicked and once it is the python code I have for the app initiates and runs in its entirety. Eventually I want to create …

  10. How Can I Make One Python File Run Another File?

    Mar 20, 2024 · The most straightforward way to run a Python file from another is by using the import statement. This approach treats the target file as a module, allowing you to call its …

Refresh