source: traclegosscript/anyrelease/traclegos/pastescript/var.py

Last change on this file was 4216, checked in by Jeff Hammel, 15 years ago

initial commit of TracLegos at trac-hacks, moved from https://svn.openplans.org/svn/trac/install/TracLegos

File size: 273 bytes
Line 
1# XXX consolidate pastescript vars with trac options
2
3def vars2dict(_dict, *vars):
4    if _dict is None:
5        _dict = {}
6    for var in vars:
7        _dict[var.name] = var
8    return _dict
9
10def dict2vars(_dict):
11    return [ _dict[key] for key in sorted(_dict.keys()) ]
Note: See TracBrowser for help on using the repository browser.