woodenduck 0 Newbie Poster

Hey all I need some help with Jython.

In Python I'm given the easy option to read a file with

file = open('/dev/input/js0')

Then I can put it into a non blocking mode with something similar to

import os, fcntl
file = os.open('/dev/input/js0', os.O_NONBLOCK)

But in Jython I'm not sure how to do this. I'm trying to read in from a joystick which only updates when a button is pressed down and then again when it is let up.

Any help would be greatly appreciated.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.