How to open External Programs using Tkinter? Last Updated : 23 Jan, 2023 Comments Improve Suggest changes Like Article Like Report Prerequisite: Tkinter, os Python offers multiple options for developing a GUI (Graphical User Interface). Out of all the GUI methods, Tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with Tkinter is the fastest and easiest way to create GUI applications. In this article, we will learn how to open an external program using Tkinter. Here we will use the system() method in the os module. Approach: First, we will import the required libraryThen we create an object, which will ask for a file that you want to openTo open that file we will use the system() method from the os Module. Syntax: os.system('"%s"' % File Path) Below is the Implementation: Python3 # Import Library from tkinter import * import os from tkinter.filedialog import askopenfilename # Create Object root = Tk() # Set geometry root.geometry('200x200') def open_file(): file = askopenfilename() os.system('"%s"' % file) Button(root, text ='Open', command = open_file).pack(side = TOP, pady = 10) # Execute Tkinter root.mainloop() Output: Opening application with their name Prerequisite: Tkinter, AppOpener The AppOpener is the python library that helps in opening any application without knowing it's an absolute path. The library works by making use of App name and App Id. Approach: First, we will import the required library.Then we create a text area, which takes the input of the application name that we have to open.To open that specific application we will use open() function of AppOpener module. Syntax: AppOpener.open(app_name) Below is the Implementation: Python3 import tkinter as tk # Library used to open applications import AppOpener # Create Object root = tk.Tk() # Set geometry root.geometry("500x500") # Create the text area text_area = tk.Text(root, height=10, width=30, font=("",20)) text_area.pack() # Autofocus cursor in text area text_area.focus() # Create the button button = tk.Button(root, text="Open App", font=("", 20)) button.pack() # Create the label label = tk.Label(root, text="", font=("", 15)) label.pack() label.config(text="JUST ENTER NAME OF APPLICATION TO OPEN") def open_app(event): # Get application name app_name = text_area.get("1.0", "end") # Open application AppOpener.open(app_name) # Change the label accordingly label.config(text=str("Looking for "+app_name)) text_area.delete("1.0", "end") # Bind the button to the function button.bind("<Button-1>", open_app) root.mainloop() Output: Output of the Implementation of code Comment More infoAdvertise with us Next Article How to open External Programs using Tkinter? abhigoya Follow Improve Article Tags : Python Python-tkinter Python Tkinter-exercises Practice Tags : python Similar Reads How to Print Hard Copy using Tkinter? Prerequisite: Tkinter, win32api Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easi 2 min read How To Get Rid Of Python Tkinter Root Window? Python's Tkinter library offers a simple and effective way to create graphical user interfaces (GUIs) for your applications. However, when using Tkinter, you may encounter situations where you need to close or remove the root window, which is the main window of your GUI. Whether you're looking to cl 2 min read How to use Thread in Tkinter Python Prerequisite: Python GUI â tkintermultithreading Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is th 2 min read Save Image To File in Python using Tkinter Saving an uploaded image to a local directory using Tkinter combines the graphical user interface capabilities of Tkinter with the functionality of handling and storing images in Python. In this article, we will explore the steps involved in achieving this task, leveraging Tkinter's GUI features to 4 min read How to create Option Menu in Tkinter ? The Tkinter package is the standard GUI (Graphical user interface) for python, which provides a powerful interface  for the Tk GUI Toolkit. In this tutorial, we are expecting that the readers are aware of the concepts of python and tkinter module. OptionMenu In this tutorial, our main focus is to cr 3 min read File Explorer in Python using Tkinter Prerequisites: Introduction to Tkinter Python offers various modules to create graphics programs. Out of these Tkinter provides the fastest and easiest way to create GUI applications. The following steps are involved in creating a tkinter application: Importing the Tkinter module. Creation of the 2 min read How to Create Full Screen Window in Tkinter? Prerequisite: Tkinter There are two ways to create a full screen window in tkinter using standard python library for creating GUI applications. Method 1: Using attributes() function Syntax: window_name.attributes('-fullscreen',True) We will set the parameter '-fullscreen' of attributes() to True for 3 min read How To Print Entry Text Tkinter? Tkinter is a popular GUI library in Python that allows developers to create desktop applications. One common task is retrieving and displaying the text entered by users. In this article, we'll go through the steps to create a simple Tkinter application that prints the text from an Entry widget in Py 4 min read How to close a window in Tkinter? Python offers multiple options for developing GUI (Graphical User Interface). Out of all the GUI methods, tkinter is the most commonly used method. It is a standard Python interface to the Tk GUI toolkit shipped with Python. Python with tkinter is the fastest and easiest way to create GUI applicatio 1 min read How to Use Entry Box on Canvas - Tkinter There are various ways of creating GUI applications in Python. One of the easiest and most commonly used ways is through the use of the Tkinter module. Tkinter offers various widgets for creating web apps.  One such widget is the Entry box, which is used to display a single line of text. Are you fac 5 min read Like