for my graduation project I am making a arcade GUI in Python 3.7. Now I got a little stuck here, what I am trying to do is so when you open a new page (by clicking the button) i want it so that a executable file (ex: pacman) will play inside the frame so not with the 'os' method.
Is there a possibility to make it like when you click on the button 'play' that the game starts inside of the window/frame instead of opening it outside of the program?
Here is a piece of my code:
def init(self,master):
Frame.init(self, master)
self.frameName="GamePage"
backgr = Image.open("Gamepage_background.png")
render = ImageTk.PhotoImage(backgr)
background = Label(self, image=render)
background.image = render
background.place(x=0, y=0, relwidth=1, relheight=1)
Button(self, text = "Go back to main page",font=('Arcade Interlaced',15),bg="black",fg="white",command=lambda: master.changeFrame(0)).pack(side=BOTTOM, anchor = W , pady= 15, padx= 15)
Button(self, text = "Pac Man",font=('Arcade Interlaced',30),bg="purple",fg="white",command = master.openPacman).place(anchor = CENTER, relx= 0.27, rely= 0.275, width = 475, height = 125) #voorlopig in orde in 1920x1080
Button(self, text = "Space Invaders",font=('Arcade Interlaced',30),bg="purple",fg="white",command= master.openSpaceinvaders, wraplength = 350, justify = CENTER).place(anchor = CENTER, relx= 0.74, rely= 0.275, width = 475, height = 125)'''
What I want is when i click on one of the two games it would open up a new frame with the game playing inside the frame and not externaly.
Thank you and i hope i find the answer soon!