How to Open Multiple Software Using Python OS Module

Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python

Program 1

import os
choice=0
while(choice!=8):
    print("--------------------Menu--------------------")
    print("1.NotePad\n2.Calculator\n3.MS Word\n4.MS Excel\n5.MS Paint\n6.Power Point\n7.Notepad++\n8.Exit")
    print("---------------------------------------------")
    choice=int(input("Enter your choice"))
    if(choice==1):
        os.system("notepad")
    elif (choice==2):
        os.system("calc")
    elif (choice==3):
        os.system("start winword.exe")
    elif (choice==4):
        os.system("start excel.exe")
    elif(choice==5):
        os.system("mspaint")
    elif (choice==6):
        os.system("start powerpnt.exe")
    elif (choice==7):
        os.system("start notepad++.exe")
    else:
        print("Invalid choice.....")

 

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *