On Mon, Nov 30, 2009 at 12:03 PM, Daniel <[email protected]> wrote: > Here you go: > > #!/usr/bin/env python > # encoding: utf-8 > > import pyglet > from pyglet.window import key > > import Tkinter, tkFileDialog > > window = pyglet.window.Window(width=1024, height=768, caption='Dialog > Test') > > @window.event > def on_draw(): > window.clear() > > @window.event > def on_key_press(symbol, modifiers): > if symbol == key.O: > root = Tkinter.Tk() > root.withdraw() > filename = tkFileDialog.askopenfilename() > root.destroy() > print filename > > if __name__ == '__main__': > pyglet.app.run() >
Looks like a problem with the Pyglet/Tkinter combo on Snow Leopard. Something to do with Pyglet's Carbon run loop interacting badly with Tkinter's Cocoa run loop. I would hazard a guess that it is not possible to work around that issue at the moment. -- Tristam MacDonald http://swiftcoder.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
