Mercurial > code > home > repos > light9
diff 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 |
line wrap: on
line diff
--- a/light8/Patch.py Fri Jul 12 11:08:20 2002 +0000 +++ b/light8/Patch.py Fri Jul 12 12:07:38 2002 +0000 @@ -1,5 +1,18 @@ from types import TupleType + +def resolve_name(channelname): + "Ensure that we're talking about the primary name of the light." + return get_channel_name(get_dmx_channel(channelname)) + + +def get_all_channels(): + """returns primary names for all channels (sorted)""" + prinames = reverse_patch.values()[:] + prinames.sort() + return prinames + + def get_dmx_channel(name): if name in patch: return patch[name]