annotate bin/kcclient @ 901:0dacbba70d06 last-2012

remove some broken profiler attempts Ignore-this: 3d50124a16807ee922e85911d510ce58
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 10 Jun 2013 00:09:17 +0000
parents 46d319974176
children 7772cc48e016
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
205
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
1 #!/usr/bin/env python
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
2
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
3 """send KeyboardComposer a fade request, for use from the shell"""
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
4
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
5 import sys
270
54774cba50c9 revive kcclient and fix subcomposer so kcclient works through refreshes
Drew Perttula <drewp@bigasterisk.com>
parents: 205
diff changeset
6 import run_local
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
7 from restclient import Resource
270
54774cba50c9 revive kcclient and fix subcomposer so kcclient works through refreshes
Drew Perttula <drewp@bigasterisk.com>
parents: 205
diff changeset
8 from light9 import networking
205
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
9
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
10 subname = sys.argv[1]
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
11 level = sys.argv[2]
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
12 fadesecs = '0'
205
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
13 if len(sys.argv)>3:
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
14 fadesecs = sys.argv[3]
205
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
15
623
46d319974176 move networking settings to config.n3
drewp@bigasterisk.com
parents: 512
diff changeset
16 levelServer = Resource(networking.keyboardComposer.url)
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
17 levelServer.post('fadesub', subname=subname, level=level, secs=fadesecs)
205
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
18
3905d3c92aaa twisted mainloop, more row-change keys, xmlrpc fadesub command on port 8050
drewp
parents:
diff changeset
19