Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Pygame and TKinter

Reply
Thread Tools

Pygame and TKinter

 
 
Lane LiaBraaten
Guest
Posts: n/a
 
      10-28-2003
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

 
Reply With Quote
 
 
 
 
Lane LiaBraaten
Guest
Posts: n/a
 
      11-03-2003
On Monday 03 November 2003 07:00 pm, Matthew Wilson wrote:
> In article <(E-Mail Removed)>, Lane
>
> LiaBraaten wrote:
> > 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?



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

 
Reply With Quote
 
 
 
 
Matthew Wilson
Guest
Posts: n/a
 
      11-03-2003
In article <(E-Mail Removed)>, Lane
LiaBraaten wrote:

> 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?
 
Reply With Quote
 
Lee Harr
Guest
Posts: n/a
 
      11-04-2003
> 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/

 
Reply With Quote
 
email9898989@yahoo.com
Guest
Posts: n/a
 
      11-05-2003
Lane LiaBraaten <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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).
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[pygame-bug] Pygame.cdrom bug rantingrick Python 1 01-30-2011 04:40 AM
What is the differences between tkinter in windows and Tkinter in theother platform? Hidekazu IWAKI Python 1 12-14-2009 03:44 PM
RE: Can anyone tell me if pygame and Tkinter can work together? Nathan Pinno Python 5 11-19-2005 12:18 AM
Can anyone tell me if pygame and Tkinter can work together? Nathan Pinno Python 1 11-16-2005 01:28 AM
Tkinter and Pygame Kathleen Kudzma Python 0 09-16-2003 11:41 AM



Advertisments