#!/usr/bin/python import phydget #print "phydget.test is", phydget.test print "calling main" r = phydget.main() print "main returned", r def attached(serial, version, id): print "attached, serial=%d version=%d device=%s" % (serial, version, id) phydget.set_AttachHandler(attached) phydget.initialize() import time while 1: time.sleep(0.1)