How to check if an application is open in Python? Last Updated : 24 Feb, 2021 Comments Improve Suggest changes Like Article Like Report This article is about How to check if an application is open in a system using Python. You can also refer to the article Python – Get list of running processes for further information. In the below approaches, we will be checking if chrome.exe is open in our system or not. Using psutil The psutil is a system monitoring and system utilization module of python. It is useful mainly for system monitoring, profiling and limiting process resources, and management of running processes. Usage of resources like CPU, memory, disks, network, sensors can be monitored. It is supported in Python versions 2.6, 2.7, and 3.4+. You can install psutil module by using the following command pip install psutil We will use the psutil.process_iter() method, it returns an iterator yielding a process class instance for all running processes on the local machine. Python3 # import module import psutil # check if chrome is open "chrome.exe" in (i.name() for i in psutil.process_iter()) Output: True We import the psutil module. Then we search for chrome.exe in all running processes on the local machine using psutil.process_iter(). If found it will return output as TRUE, else FALSE. Using WMI (only Windows User) The wmi module can be used to gain system information of a Windows machine and can be installed using the below command: pip install wmi Its working is similar to psutil. Here, we check if a particular process name is present in the list of running processes. Python3 # Import module import wmi # Initializing the wmi constructor f = wmi.WMI() flag = 0 # Iterating through all the running processes for process in f.Win32_Process(): if "chrome.exe" == process.Name: print("Application is Running") flag = 1 break if flag == 0: print("Application is not Running") Output: Application is Running We import the wmi module. Then we search for chrome.exe in all running processes on the local machine by iterating through the process names. If it matches with the process. Name, it will print Application is Running, else Application is not Running. Comment More infoAdvertise with us Next Article How to check if an application is open in Python? biswasarkadip Follow Improve Article Tags : Python python-utility Practice Tags : python Similar Reads How to Check If Python Package Is Installed In this article, we are going to see how to check if Python package is installed or not. Check If Python Package is InstalledThere are various methods to check if Python is installed or not, here we are discussing some generally used methods for Check If Python Package Is Installed or not which are 5 min read Creating Your First Application in Python Python is one of the simplest and most beginner-friendly programming languages available today. It was designed with the goal of making programming easy and accessible, especially for newcomers. In this article, we will guide you through creating your very first Python application from a simple prin 4 min read OpenCV Python: How to detect if a window is closed? OpenCV in Python provides a method cv2.getWindowProperty() to detect whether a window is closed or open. getWindowProperty() returns -1 if all windows are closed. This is one of the main problems we face while using the OpenCV package, sometimes it's hard to detect whether the window is open or clos 2 min read How to Get Open Port Banner in Python In this article, we will see how to Get Open Port Banner in Python. Here we will discuss What is Port? Port is a terminology used on computer networks. You might know, that whenever you connect to the internet, your system or any device to which you are connecting is assigned an IP address.  So, wh 4 min read Build an Application to Search Installed Application using Python In this article, we are going to write python scripts to search for an installed application on Windows and bind it with the GUI application. We are using winapps modules for managing installed applications on Windows. Prerequisite - Tkinter in Python To install the module, run this command in your 6 min read How to check any script is running in linux using Python? Python is a strong and exponentially growing programming language in the present day. There is a multiple-way to check which script is running in the background of a Linux environment. One of them is using the subprocess module in python. Subprocess is used to run new programs through Python code by 2 min read How to Create a Simple Messagebox in Python Python has the capability to create GUI applications using libraries like tkinter and PyQt5. These libraries provide easy-to-use methods for creating various GUI elements, including messageboxes. In this article, we will explore both this approaches to create a simple messagebox in Python. Create A 2 min read Python - How to Check if a file or directory exists Sometimes it's necessary to verify whether a dictionary or file exists. This is because you might want to make sure the file is available before loading it, or you might want to prevent overwriting an already-existing file. In this tutorial, we will cover an important concept of file handling in Pyt 5 min read An application to test the given page is found or not on the server using Python Prerequisite: Python Urllib module In this article, we are going to write scripts to test whether the given page is found on the server or not with a GUI application. We need to Install Urllib Module to carry out this operation. Type this command in your terminal. pip install urllib Approach: Import 2 min read How to Get directory of Current Script in Python? A Parent directory is a directory above another file/directory in a hierarchical file system. Getting the Parent directory is essential in performing certain tasks related to filesystem management. In this article, we will take a look at methods used for obtaining the Parent directory of the curren 4 min read Like