annotate bin/kcclient @ 517:f15ffbfc5cd6

speed up curvecalc tk update to 10ms (since we recently sped up the recalcs) Ignore-this: 6acdb9b5aab226565d61116c93118b12
author drewp@bigasterisk.com
date Mon, 29 Jun 2009 04:08:43 +0000
parents 179281f28d65
children 46d319974176
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
512
179281f28d65 convert kcclient to use http; untested
drewp@bigasterisk.com
parents: 270
diff changeset
16 levelServer = Resource(networking.keyboardComposerUrl())
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