1,105,363 Community Members

pygame in tkinter

Member Avatar
Newbie Poster
19 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]


Is it possible to embed something made with pygame, like some sort of animated display or bouncing ball... into a Tkinter made window, with tkinter buttons/frames etc...
If yes, then may you please tell me how can i do that?


Member Avatar
Newbie Poster
16 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]

if you want to display a bouncing ball or something simple the tkinter library uses .gif images, so you could create a gif of that if you absoulutly need it to be made in Pygame i cant help you there.

Member Avatar
DaniWeb's Hypocrite
6,984 posts since Oct 2004
Reputation Points: 1,544 [?]
Q&As Helped to Solve: 1,872 [?]
Skill Endorsements: 67 [?]

You can use certain pygame modules like the pygame mixer with Tkinter to play sounds.
However, IMHO for the application you want to use the pygame and the Tkinter event loops will clash.
You may have to use module threading to make this go.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article