473,388 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Pygame and TKinter

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.


Jul 18 '05 #1
2 4878
> 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?


Jul 18 '05 #2
Lane LiaBraaten <ll******@isrparc.org> wrote in message news:<ma************************************@pytho n.org>...
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
capabilities of pygame and the gui stuff from tkinter.

See this page for how to do that in WxPython:

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).
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Kathleen Kudzma | last post by:
Does anyone know how to embed a Pygame window in a Tkinter widget? _________________________________________________________________ Express yourself with MSN Messenger 6.0 -- download now!...
by: schwerdy | last post by:
Hi, I'm trying to write a function with pygame that takes the path to a ..jpg image and displays it in a maximized/fullscreen window. I'm stuck at pygame.display.set_mode() :-) This function...
by: Andr? Roberge | last post by:
Sorry about the cryptic subject line, but I wanted to capture the essence of my message in a single line. I am learning Python (which, as everyone know is the best language :-) so that I can...
by: Marian Aldenhövel | last post by:
Hi, I am trying to make pygame play music on windows. This simple program: import pygame,time pygame.init() print "Mixer settings", pygame.mixer.get_init() print "Mixer channels",...
by: Tim Knauf | last post by:
Hi everyone, I'm glad to have found this list. I've written a small script for my own use which, amongst other things, captures mouse click information from a window containing an image. I used...
by: Nathan Pinno | last post by:
Hi, Can anyone tell me if pygame and Tkinter can work together in the same application? I thought I'd better ask before trying it, since both use widgets. Thanks, Nathan Pinno --
by: PatrickMinnesota | last post by:
I know this isn't strictly a Python question, but I'm betting some here might be able to give me a hint. I have a few graphical programs doing some 2D data visualization using simple Pygame code...
by: globalrev | last post by:
im doing this : http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using-pygame-part-one/ and when closing the program the window stays up and doesnt respond. i tried adding...
by: Nick Dumas | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm doing a project with Pygame, a Snake game, and I've just taken a look at Tkinter and I really like how easy it is to build a GUI with it. The...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.