![]() ![]() Note: replace the with your file name pythonw.exe. Just follow this simple command to make your application run in the background, note you need to type this command in command prompt in case you are using Windows and terminal in case you are using Linux. How to make a python application to run in the background? Here is a solution, you can make this automated by running your application as a background process in your PC. But don't you think this is a tedious job, every time running your application to get a notification? So you finally created a python application and it runs fine when you go and run it. Image by Satya Ganesh Making your application run in the background We can fetch the coronavirus data using the URL provided below, you are free to replace the country name with your own country name, for this application we will be using India’s coronavirus data. These notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user. plyer (for creating notifications on your PC) pip install plyer Reading the coronavirus data from the web The Notification interface of the Notifications API is used to configure and display desktop notifications to the user. requests (for fetching data from the web)Ģ.Note: you need to type this two commands in command prompt if you are using Windows or terminal if you are using Linux ![]() We need to download two important packages for this application. Let's get started Installing required python packages Making your program run in the background.Creating a desktop notifier application.Reading the coronavirus data from the web.Have you ever tried to create a desktop notifications application based on your needs? do you know you can do this in a few simple steps using python?ĭon't worry, let's do this from scratch, in this article we will be creating a desktop notification application for getting the daily stats of the dreadful coronavirus. Photo by Cookie the Pom on Unsplash Introduction ![]()
0 Comments
Leave a Reply. |