It is impossible to determine the pull state of GPIO on most Pi (except by measurement). It is possible with the BCM2711 used by Pi4 and I have written a Python3 library (based on RPi.GPIO) which does this and a program gpioread which shows this and the actual programmed function/state. See https://raspberrypi.stackexchange.com/a/117593/8697 Corrupted git repository fixed. This can be downloaded git clone https://github.com/Milliways2/Pi.GPIO.git And installed with sudo apt install python-dev python3-dev sudo python3 setup.py install NOTE you can also get pull using the raspi-gpio utility.