view bin/kcclient @ 793:cbfed4e684ef

redo asco web server to use twisted/cyclone. mainloop is now glib inside twisted. seems ok (and lower cpu usage) but not well tested Ignore-this: 24ae0b173599a0d99e465f1b5a10f39b
author drewp@bigasterisk.com
date Sat, 30 Jun 2012 06:29:23 +0000
parents 46d319974176
children 7772cc48e016
line wrap: on
line source

#!/usr/bin/env python

"""send KeyboardComposer a fade request, for use from the shell"""

import sys
import run_local
from restclient import Resource
from light9 import networking

subname = sys.argv[1]
level = sys.argv[2]
fadesecs = '0'
if len(sys.argv)>3:
    fadesecs = sys.argv[3]

levelServer = Resource(networking.keyboardComposer.url)
levelServer.post('fadesub', subname=subname, level=level, secs=fadesecs)