Pygame and TKinter

L

Lane LiaBraaten

Does anyone know a way to insert a pygame surface into a tkinter gui?
I am writing a program similar to a mpeg player, i.e. i need the mpeg playing
capabilities of pygame and the gui stuff from tkinter.

TIA,
LGL
 
L

Lane LiaBraaten

There's a limited gui interface available with pygame. You could also
always make your own button icons and have them respond to button
clicks. What Tkinter widgets do you want to use in particular?


I need buttons, text inputs, and scrolling text output. All I've found is the
text input from the pygame code repository site. Rather than make my own
widgets I am planning to have one window for the mpeg viewer and one for the
rest of the GUI (although one window would be better).

Can you point me to any source code for buttons, or a scrolling textbox?

Also, as time is a factor, which design is likely to be faster (at run time,
not development):

1. Totally pygame interface with custom widgets (one window), or

2. pygame only for mpeg playing, and tkinter for the rest (2+ windows)

TIA,
LGL
 
M

Matthew Wilson

Does anyone know a way to insert a pygame surface into a tkinter gui?
I am writing a program similar to a mpeg player, i.e. i need the mpeg playing
capabilities of pygame and the gui stuff from tkinter.

TIA,
LGL

There's a limited gui interface available with pygame. You could also
always make your own button icons and have them respond to button
clicks. What Tkinter widgets do you want to use in particular?
 
L

Lee Harr

I need buttons, text inputs, and scrolling text output. All I've found is the
text input from the pygame code repository site. Rather than make my own
widgets I am planning to have one window for the mpeg viewer and one for the
rest of the GUI (although one window would be better).

Can you point me to any source code for buttons, or a scrolling textbox?

http://savannah.nongnu.org/projects/pygsear/
 
E

email9898989

Lane LiaBraaten said:
Does anyone know a way to insert a pygame surface into a tkinter gui?
I am writing a program similar to a mpeg player, i.e. i need the mpeg pla
ying
capabilities of pygame and the gui stuff from tkinter.

See this page for how to do that in WxPython:
http://wiki.wxpython.org/index.cgi/IntegratingPyGame

To translate that code to Tkinter, you would use frame.winfo_id() to
get the window handle instead of wxpython's GetHandle().

But these are both basically just hacks. Options for multimedia
playing/editing are slim in python. You might use Java instead (see
jython), using either the java media framework or quicktime for java
(latter doesn't work on Linux).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top