def __del__(self): """Set output bits low when closing.""" raw_lpt_module.out(self.channel.device.base_address, 0)
def put_data(self, data): """Set output bits 0-7 (pins 2-9) on the LPT port.""" raw_lpt_module.out(self.channel.device.base_address, data)
try: import Pyro.core print "Pyro version %s" % (Pyro.core.constants.VERSION, ), if Pyro.core.constants.VERSION >= '2.7': print "(OK)" else: print "(Untested)" except: print "Pyro failed" if sys.platform == 'win32': try: import winioport print "winioport", try: winioport.out(0x378, 0) print "(appears to work)" except: print "(not working)" except: print "winioport failed" if gui_ok and sys.platform == 'win32': showwarning( title="View the console", message="""This dialog keeps the console open until you close it. Although by default the Vision Egg prints everything (including errors) to VisionEgg.log, it may be necessary to view the console. In that case, you have to run the script from the command line so that the console does not disappear when the program is finished executing.""")
try: import Pyro.core print "Pyro version %s"%(Pyro.core.constants.VERSION,), if Pyro.core.constants.VERSION >= '2.7': print "(OK)" else: print "(Untested)" except: print "Pyro failed" if sys.platform == 'win32': try: import winioport print "winioport", try: winioport.out(0x378,0) print "(appears to work)" except: print "(not working)" except: print "winioport failed" if gui_ok and sys.platform == 'win32': showwarning(title="View the console", message= """This dialog keeps the console open until you close it. Although by default the Vision Egg prints everything (including errors) to VisionEgg.log, it may be necessary to view the console. In that case, you have to run the script from the command line so that the console does not disappear
def __del__(self): """Set output bits low when closing.""" raw_lpt_module.out(self.channel.device.base_address,0)
def put_data(self,data): """Set output bits 0-7 (pins 2-9) on the LPT port.""" raw_lpt_module.out(self.channel.device.base_address,data)