Personal tools
Document Actions

Using the new python API?

Up to Scripts

Using the new python API?

Posted by techgeek at October 29. 2008

How would I start my script and connnect to tux?


Before, I did not need to connect, now do I need to before I start sending commands?


Re: Using the new python API?

Posted by Eric LESCAUDRON at October 29. 2008
I do this, see tuxisalive.api with pydoc

from tuxisalive.api import *
tux = TuxAPI('127.0.0.1', 270)
tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, 'MyAppName', 'myPassword')
tux.server.waitConnected(10.0)
tux.dongle.waitConnected(10.0)
tux.radio.waitConnected(10.0)
if tux.access.waitAcquire(10.0, ACCESS_PRIORITY_NORMAL):
    ....
    ....
    tux.access.release()
....
.... 

tux.server.disconnect()
tux.destroy()

Powered by Ploneboard
You are here: Home Forum Scripts Using the new python API?

Powered by Plone CMS, the Open Source Content Management System