google-code-export / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Importing pyglet modules causes the window focus to change #706

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
My goal is to play mp3 files with pyglet on the Windows terminal, no 
video/opengl required. Unfortunately, when importing Player from pyglet.media, 
the console window loses focus.

Sample code:

    #!/usr/bin/env python

    import time

    if __name__ == '__main__':
        from pyglet.media import Player
        # just to avoid closing immediately, otherwise we can't notice the issue:
        while True:
            time.sleep(0.1)

After starting the program I need to click on the console window to regain 
focus and be able to press control+c. The same happens if I try to import other 
modules such as avbin.

Windows 7 x86-64, Python 3.3.3, pyglet (1.2alpha1)

Original issue reported on code.google.com by bel...@gmx.com on 24 Feb 2014 at 7:00