Open Any application from your laptop using Python

Step 1: Install python IDLE
Step 2: type below commands

Import subprocess
subprocess.call(AppPath//AppName.exe)

Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21)
[MSC v.1927 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or …


This content originally appeared on DEV Community and was authored by Suresh Ayyanna

Step 1: Install python IDLE
Step 2: type below commands

  1. Import subprocess
  2. subprocess.call(AppPath//AppName.exe)
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21)
 [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" 
for more information.

>>> import subprocess
>>> subprocess.call('cmd.exe')

Eg 1: Open Mozilla from your laptop

subprocess.call(['C:\Program Files\Mozilla Firefox\\firefox.exe'])


This content originally appeared on DEV Community and was authored by Suresh Ayyanna


Print Share Comment Cite Upload Translate Updates
APA

Suresh Ayyanna | Sciencx (2022-01-22T12:31:09+00:00) Open Any application from your laptop using Python. Retrieved from https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/

MLA
" » Open Any application from your laptop using Python." Suresh Ayyanna | Sciencx - Saturday January 22, 2022, https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/
HARVARD
Suresh Ayyanna | Sciencx Saturday January 22, 2022 » Open Any application from your laptop using Python., viewed ,<https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/>
VANCOUVER
Suresh Ayyanna | Sciencx - » Open Any application from your laptop using Python. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/
CHICAGO
" » Open Any application from your laptop using Python." Suresh Ayyanna | Sciencx - Accessed . https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/
IEEE
" » Open Any application from your laptop using Python." Suresh Ayyanna | Sciencx [Online]. Available: https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/. [Accessed: ]
rf:citation
» Open Any application from your laptop using Python | Suresh Ayyanna | Sciencx | https://www.scien.cx/2022/01/22/open-any-application-from-your-laptop-using-python/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.