1 2 3 4 5 6 7
def getFPVersion(): from fcntl import ioctl try: fp = open("/dev/dbox/fp0") return ioctl(fp.fileno(),0) except IOError: return None