Are you using pyglet.app.run() in your project as well? If so, and you 
still have trouble, feel free to share your code if you need help.

-Ben

On Sunday, April 30, 2017 at 2:37:58 PM UTC+9, Solar Lune wrote:
>
> OK, I made a quick test:
>
>
> import pyglet
>
> joystick = pyglet.input.get_joysticks()[0]
>
> joystick.open()
>
> def update(dt):
>
>     print(joystick.buttons)
>
> pyglet.window.Window(640, 480, caption="Joystick Test", resizable=True, 
> vsync=False)
>
> pyglet.clock.schedule_interval(update, 1.0/60.0)
>
> pyglet.app.run()
>
>
> ... and it was working, so it must be something wrong with what I'm doing 
> in my main project. I'll investigate it. Thanks for the help!
>
> On Saturday, April 29, 2017 at 8:45:47 PM UTC-7, Benjamin Moran wrote:
>>
>> Are you running from the Python REPL by any chance? The joysticks rely on 
>> a running event loop, so they won't work correctly from the CLI. 
>>
>> There is a joystick example in the "examples" folder on the bitbucket 
>> repo. You can give that a try to confirm.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to