Pygame and TKinter

Discussion in 'Python' started by Lane LiaBraaten, Oct 28, 2003.

  1. 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
    Lane LiaBraaten, Oct 28, 2003
    #1
    1. Advertising

  2. On Monday 03 November 2003 07:00 pm, Matthew Wilson wrote:
    > In article <>, 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
    Lane LiaBraaten, Nov 3, 2003
    #2
    1. Advertising

  3. In article <>, 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?
    Matthew Wilson, Nov 3, 2003
    #3
  4. Lane LiaBraaten

    Lee Harr Guest

    > 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/
    Lee Harr, Nov 4, 2003
    #4
  5. Lane LiaBraaten

    Guest

    Lane LiaBraaten <> wrote in message news:<>...
    > 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).
    , Nov 5, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kathleen Kudzma

    Tkinter and Pygame

    Kathleen Kudzma, Sep 16, 2003, in forum: Python
    Replies:
    0
    Views:
    399
    Kathleen Kudzma
    Sep 16, 2003
  2. Nathan Pinno
    Replies:
    1
    Views:
    364
  3. Nathan Pinno
    Replies:
    5
    Views:
    1,127
    Nathan Pinno
    Nov 19, 2005
  4. Hidekazu IWAKI
    Replies:
    1
    Views:
    365
    Peter Otten
    Dec 14, 2009
  5. rantingrick

    [pygame-bug] Pygame.cdrom bug

    rantingrick, Jan 30, 2011, in forum: Python
    Replies:
    1
    Views:
    295
    Benjamin Kaplan
    Jan 30, 2011
Loading...

Share This Page