4 hdaps-pivot - read hdaps position and print it
14 def pivot(count
=1000, verbose
=False):
15 calX
,calY
= readPosition(True)
16 print '(x,y) base: (%u,%u)' % (calX
, calY
)
17 for i
in range(0,count
):
18 posX
,posY
= readPosition()
19 print '(x,y) position: (%i,%i)' % (posX
-calX
, posY
-calY
)
21 print 'keyboard=%i mouse=%i' % (readKeyboardActivity(), readMouseActivity())
25 print 'hdaps-pivot from pyhdaps, version %s' % __version__
27 print '\t-c, --count <count>\tthe count of rounds it will print'
28 print '\t-v, --verbose\tprint also keyboard and mouse activity'
32 opts
, args
= getopt
.getopt(sys
.argv
[1:], "hc:v", ["help", "count=", "verbose"])
33 except getopt
.GetoptError
, err
:
40 if o
in ("-v", "--verbose"):
42 elif o
in ("-h", "--help"):
45 elif o
in ("-c", "--count"):
50 if __name__
== '__main__':