Reading I/0 port USRP

Hello,

I have recently created a GnuRadio program in python for a spectroscope
that i’m working on. However there still remains a couple of functions
that i need to implement, one of which requires to read a square wave
signal on the I/O port of the USRP (Ettus X310).

I’m having difficulty finding a way to read these incoming ones and
zeros in python. I have read something about gr-gpio but i can’t find
any concrete examples.

Anyone that can guide me in the right direction or perhaps show some
examples?

Any help would be appreciated

Regards
Simon