python-stdnum commit: r170 - python-stdnum
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum commit: r170 - python-stdnum
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org
- Subject: python-stdnum commit: r170 - python-stdnum
- Date: Sun, 26 Feb 2012 16:24:57 +0100 (CET)
Author: arthur
Date: Sun Feb 26 16:24:56 2012
New Revision: 170
URL: http://arthurdejong.org/viewvc/python-stdnum?revision=170&view=revision
Log:
also generate a list of modules for use in the Spinx documentation
Modified:
python-stdnum/getnumlist.py
Modified: python-stdnum/getnumlist.py
==============================================================================
--- python-stdnum/getnumlist.py Sun Feb 26 16:19:16 2012 (r169)
+++ python-stdnum/getnumlist.py Sun Feb 26 16:24:56 2012 (r170)
@@ -31,6 +31,13 @@
algortihms = ('stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064')
+def get_number_modules():
+ """Provides the number modules that are not algorithms."""
+ for module in util.get_number_modules():
+ if module.__name__ not in algortihms and \
+ not module.__name__.startswith('stdnum.iso7064'):
+ yield module
+
def get_number_name(module):
"""Return the short description of the number module."""
return pydoc.splitdoc(pydoc.getdoc(module))[0]
@@ -39,7 +46,10 @@
if __name__ == '__main__':
print 'Currently this package supports the following formats:'
print ''
- for module in util.get_number_modules():
- if module.__name__ not in algortihms and \
- not module.__name__.startswith('stdnum.iso7064'):
- print ' * %s' % get_number_name(module)
+ for module in get_number_modules():
+ print ' * %s' % get_number_name(module)
+ print ''
+ print 'For use in Spinx documentation:'
+ print ''
+ for module in get_number_modules():
+ print ' %s' % module.__name__.replace('stdnum.', '')
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/
- python-stdnum commit: r170 - python-stdnum,
Commits of the python-stdnum project