projects
/
~helmut
/
onoff.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3e548dd
)
add a sispmctl_device
author
Helmut Grohne
<helmut@subdivi.de>
Sun, 14 Jul 2013 18:54:38 +0000
(20:54 +0200)
committer
Helmut Grohne
<helmut@subdivi.de>
Sun, 14 Jul 2013 18:54:38 +0000
(20:54 +0200)
onoff/tools.py
[new file with mode: 0644]
patch
|
blob
diff --git a/onoff/tools.py
b/onoff/tools.py
new file mode 100644
(file)
index 0000000..
fd5e5f2
--- /dev/null
+++ b/
onoff/tools.py
@@ -0,0
+1,11
@@
+from .command import OnoffCommand
+
+def sispmctl_device(sock):
+ """Create an OnoffCommand that controls the specified socket on a sispmctl
+ device.
+
+ @type sock: int
+ @param sock: the socket number of the sispmctl controlled device
+ """
+ return OnoffCommand(["sispmctl", "-o", "%d" % sock],
+ ["sispmctl", "-f", "%d" % sock])