sort as the sort command does

This commit is contained in:
lilydjwg 2013-07-02 17:24:33 +08:00
parent 0664140379
commit 4d75b63c95
2 changed files with 7 additions and 1 deletions

View file

@ -86,3 +86,7 @@ Other
-----
More to come. Send me a patch or pull request if you can't wait and have written one yourself :-)
Bugs
----
* Finish writing results even on Ctrl-C or other interruption.
* ``setup.py`` script.

View file

@ -62,7 +62,9 @@ def write_verfile():
return
with open(options.verfile, 'w') as f:
for item in sorted(g_curver.items()):
# sort using only alphanums, as done by the sort command, and needed by
# comm command
for item in sorted(g_curver.items(), key=lambda i: (''.join(filter(str.isalnum, i[0])), i[1])):
print('%s: %s' % item, file=f)
def print_version_update(name, version):