Digital input python script

Is there a way to get/catch a digital input signal from a URe3 in a python script? I have a socket tcp (ethernet) connection. On my cobot there are two buttons connected (start / stop) both give a digital input on the teach pendant. Get_digital_input doesn’t excists. Any ideas? I read something about a xml file…

get_standard_digital_in(n)

Get standard digital input signal level
See also get_configurable_digital_in and get_tool_digital_in.
Parameters n: The number (id) of the input, integer: [0:7]
Return Value boolean, The signal level.
Example command: get_standard_digital_in(1)
• Example Parameters:
• n is standard digital input 1
• Returns True or False