[Tutor] Pygame and TkInter

Greg Nielsen gollumgreg407366 at gmail.com
Sun Sep 9 23:58:27 CEST 2012


Hello Tutor,

     Quick question. Working on a new game and want to build in a GUI.
TkInter seems to fit the bill except for one small item. Both Pygame and
TkInter create windows. (Screen in Pygame, and the Root widget in TkInter)
Is there a way to combined these two so I can use all my Pygame sprites and
objects and any TkInter bars and buttons all in one screen? My best guess
would be something along this line.

screen = pygame.display.set_mode((640, 420))
root = Tk(screen)

or maybe this...

screen = Tk(pygame.display.set_mode((640, 420))

I really just need Tkinter for some easy buttons and stuff, everything else
I can do in Pygame. Any thoughts? Thanks for the assist.

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120909/356f14b0/attachment.html>


More information about the Tutor mailing list