All right, I was going to wait until someone more knowledgeable responded, but the first response is a misunderstanding of the question.
The poster is wondering why, when he types pyglet.app.run() in the REPL, he is unable to continue typing commands (e.g. live coding pyglet). This is because the pyglet event loop (what's inside pyglet.app.run()) executes on the _main thread_. It looks something like this: while True: get event process event if user wants to exit, return If you want to write pyglet code live in the REPL, you'll probably have to do what this guy did: http://kooneiform.wordpress.com/2010/01/05/pyglet-and-livecoding-1/ If you're a newbie, I really don't recommend messing with that until you understand more of what's going on. Just work with source files, which are more predictable. On Dec 25, 1:59 pm, George Oliver <[email protected]> wrote: > On 12/24/2010 1:48 AM, Pranav Ravichandran wrote: > > > > > The mp3 file is in the same folder as the .py file. When I run it, it > > plays the mp3 file, but python freezes up. I noticed that the same > > thing happens when I type pyglet.app.run() in interactive mode. > > I'm not exactly sure if this is what the problem is, but Python will > 'freeze' until it returns from a process (running the pyglet app), it's > normal behavior. > > That said, you -can- affect the running app by modifying its source and > reloading the affected part (ignoring some details there), but as far as > I know most people don't develop with Python that way. -- 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.
