File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 4
4
"""
5
5
Interface to jambit's project traffic lights.
6
6
7
+ jambel.py ADDRESS [OPTIONS] COMMAND [COMMAND ...]
8
+
7
9
COMMANDS:
8
10
9
11
status - Will return a list of status codes for the light modules as JSON.
16
18
17
19
EXAMPLES:
18
20
19
- To remote control a Jambel, simply run this script ::
21
+ To remote control a Jambel, simply run one of these on the command line ::
20
22
21
23
jambel.py ampel3.dev.jambit.com --debug green=on yellow=blink red=off
22
24
jambel.py ampel1.dev.jambit.com:10001 reset green=flash
23
-
25
+
26
+ Type jambel.py --help for more information.
24
27
"""
25
28
26
29
import argparse
29
32
import telnetlib
30
33
import re
31
34
32
- __version__ = '0.1.1 '
35
+ __version__ = '0.1.2 '
33
36
34
37
OFF = 0
35
38
ON = 1
Original file line number Diff line number Diff line change 2
2
import os
3
3
import re
4
4
5
+
5
6
def get_version ():
6
- """
7
- Extracts version directly from Jambel module.
8
- """
9
- version_reg = re .compile ("""^__version__ = '(.*)'""" , re .M )
10
- _here = os .path .dirname (os .path .abspath (__file__ ))
11
- path = os .path .join (_here , 'jambel.py' )
12
- m = version_reg .search (open (path ).read ())
13
- return m .group (1 ) if m is not None else '?'
14
-
15
-
7
+ """
8
+ Extracts version directly from Jambel module.
9
+ """
10
+ version_reg = re .compile ("""^__version__ = '(.*)'""" , re .M )
11
+ _here = os .path .dirname (os .path .abspath (__file__ ))
12
+ path = os .path .join (_here , 'jambel.py' )
13
+ m = version_reg .search (open (path ).read ())
14
+ return m .group (1 ) if m is not None else '?'
15
+
16
+
16
17
setup (
17
18
name = 'jambel' ,
18
19
version = get_version (),
You can’t perform that action at this time.
0 commit comments