inicio mail me! sindicaci;ón

PyAppleSMS

Michele Ferretti released PyAppleSMS, a tool to use the Sudden Motion Sensor shipped in the latest Apple’s notebooks. You can find it here: http://code.google.com/p/pyapplesms/

Code example:

[code lang="python"]

!/usr/bin/env python

import applesms import time

try: while True: x, y, z = applesms.coords() print x, y, z time.sleep(1) except applesms.error, e: print ‘an error occurred: %s’ % str(e) [/code]

Have fun!

Related posts

  • No related posts
  • Gravatar

    Sean O'Donnell said,

    August 7, 2006 @ 10:42 pm

    Theres a lot of python code around for doing the same kind of thing with the HDAPS sensors on thinkpads

    see:

    http://blog.micampe.it/article.....e-smackpad http://www.oakcourt.dyndns.org.....rnal/?p=28 http://blog.odonnell.nu/61.html

    RSS feed for comments on this post · TrackBack URI

    Leave a Comment