annotate bin/kcclient @ 1799:0bb7b9df12e5

collector warnings and errors. the reactor.crash isn't working. Ignore-this: b7d4a6c08f04c924ffba6112483f9c19
author drewp@bigasterisk.com
date Fri, 08 Jun 2018 03:35:30 +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