Mercurial > code > home > repos > light9
comparison light8/Patch.py @ 85:174b35926067
converts subs from dicts to tab-sep-values and back again
author | drewp |
---|---|
date | Fri, 12 Jul 2002 12:07:38 +0000 |
parents | 5e4fb4ac2d18 |
children | f2eb20a52555 |
comparison
equal
deleted
inserted
replaced
84:09b3bf8a9201 | 85:174b35926067 |
---|---|
1 from types import TupleType | 1 from types import TupleType |
2 | |
3 | |
4 def resolve_name(channelname): | |
5 "Ensure that we're talking about the primary name of the light." | |
6 return get_channel_name(get_dmx_channel(channelname)) | |
7 | |
8 | |
9 def get_all_channels(): | |
10 """returns primary names for all channels (sorted)""" | |
11 prinames = reverse_patch.values()[:] | |
12 prinames.sort() | |
13 return prinames | |
14 | |
2 | 15 |
3 def get_dmx_channel(name): | 16 def get_dmx_channel(name): |
4 if name in patch: | 17 if name in patch: |
5 return patch[name] | 18 return patch[name] |
6 | 19 |