source:
traclegosscript/anyrelease/traclegos/pastescript/var.py
| Last change on this file was 4216, checked in by , 15 years ago | |
|---|---|
| File size: 273 bytes | |
| Line | |
|---|---|
| 1 | # XXX consolidate pastescript vars with trac options |
| 2 | |
| 3 | def vars2dict(_dict, *vars): |
| 4 | if _dict is None: |
| 5 | _dict = {} |
| 6 | for var in vars: |
| 7 | _dict[var.name] = var |
| 8 | return _dict |
| 9 | |
| 10 | def dict2vars(_dict): |
| 11 | return [ _dict[key] for key in sorted(_dict.keys()) ] |
Note: See TracBrowser
for help on using the repository browser.
