Python Program to Open Multiple Software Using GUI Application Tkinter

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

Program 1

from tkinter import *
import tkinter.filedialog
import os
def opencalc():
   os.system("calc")
def openpaintb():
    os.system("mspaint")
def openword():
    os.system("start winword.exe")
def openexcel():
    os.system("start excel.exe")
def openpower():
    os.system("start powerpnt.exe")
def opennotepad():
    os.system("notepad")
def opendate():
    os.system("date")
myroot=Tk()
myroot.geometry('600x600')
myroot.title("Menu Demo Application")
myroot.wm_iconbitmap('2.ico')
menubar=Menu(myroot)
myroot.config(menu=menubar)
filemenu=Menu(myroot,tearoff=0)
filemenu.add_command(label="NotePad",command=opennotepad)
filemenu.add_command(label="Date",command=opendate)
filemenu.add_command(label="Calculator",command=opencalc)
filemenu.add_command(label="MS Paint",command=openpaintb)
filemenu.add_command(label="MS Word",command=openword)
filemenu.add_command(label="MS Excel",command=openexcel)
filemenu.add_command(label="MS Power Point",command=openpower)
filemenu.add_separator()
filemenu.add_command(label="Exit",command=myroot.destroy)
menubar.add_cascade(label='File',menu=filemenu)

editmenu=Menu(myroot,tearoff=0)
editmenu.add_command(label="Cut")
editmenu.add_command(label="Copy")
editmenu.add_command(label="Paste")
editmenu.add_command(label="Delete")
editmenu.add_separator()
menubar.add_cascade(label='Edit',menu=editmenu)
myroot.mainloop()

 

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

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