The following example demonstrates how a DGG2 timer is operated.
#!/usr/bin/python
from PyTango import *
import sys
import time
try :
t1 = DeviceProxy( "hires/exp/t1")
scalar=t1.read_attribute( "sampleTime")
scalar.value = 3;
t1.write_attribute( scalar)
t1.command_inout( "Start")
while( t1.command_inout( "Check")):
print t1.command_inout( "Read")
time.sleep(0.5)
except :
print "Failed with exception !"
print sys.exc_info()[0]