Real Time Button Read

I want to read button real time in Jetson TX2 with python.
What should I do?
Thank you.

You can have below lib to read the GPIO status if it’s connect to GPIO pin.

Thank you,
I want to read GPIO pin real time. The library use works slowly so I can’t read the sensor real time.

Below may help.