Show More
@@ -143,8 +143,9 b' def python_info():' | |||
|
143 | 143 | |
|
144 | 144 | |
|
145 | 145 | def py_modules(): |
|
146 | mods = dict([(p.project_name, p.version) | |
|
146 | mods = dict([(p.project_name, {'version': p.version, 'location': p.location}) | |
|
147 | 147 | for p in pkg_resources.working_set]) |
|
148 | ||
|
148 | 149 | value = sorted(mods.items(), key=lambda k: k[0].lower()) |
|
149 | 150 | return SysInfoRes(value=value) |
|
150 | 151 |
@@ -46,12 +46,19 b'' | |||
|
46 | 46 | <h3 class="panel-title">${_('Python Packages')}</h3> |
|
47 | 47 | </div> |
|
48 | 48 | <div class="panel-body"> |
|
49 | <dl class="dl-horizontal settings dt-400"> | |
|
50 | % for dt, dd in c.py_modules['human_value']: | |
|
51 | <dt>${dt}${':' if dt else '---'}</dt> | |
|
52 | <dd>${dd}${'' if dt else '---'}</dd> | |
|
53 | % endfor | |
|
54 |
< |
|
|
49 | <table> | |
|
50 | <th></th> | |
|
51 | <th></th> | |
|
52 | <th></th> | |
|
53 | % for name, package_data in c.py_modules['human_value']: | |
|
54 | <tr> | |
|
55 | <td>${name.lower()}</td> | |
|
56 | <td>${package_data['version']}</td> | |
|
57 | <td>(${package_data['location']})</td> | |
|
58 | </tr> | |
|
59 | % endfor | |
|
60 | </table> | |
|
61 | ||
|
55 | 62 | </div> |
|
56 | 63 | </div> |
|
57 | 64 |
@@ -40,8 +40,8 b' SYSTEM SETTINGS' | |||
|
40 | 40 | PYTHON PACKAGES |
|
41 | 41 | --------------- |
|
42 | 42 | |
|
43 |
% for |
|
|
44 | ${'{:<60}'.format(key)}: ${value} | |
|
43 | % for name, package_data in c.py_modules['human_value']: | |
|
44 | ${'{:<60}'.format(name)}: ${'{:<20}'.format(package_data['version'])} (${package_data['location']}) | |
|
45 | 45 | % endfor |
|
46 | 46 | |
|
47 | 47 | </pre> |
General Comments 0
You need to be logged in to leave comments.
Login now