473,405 Members | 2,338 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,405 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.

TIA,
LGL

Jul 18 '05 #1
2 4880
> 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/

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

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

Similar topics

0
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!...
0
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...
5
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...
12
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",...
3
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...
2
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 --
2
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...
3
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...
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.