예제 #1
0
algortihms = (
    'stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064', 'stdnum.damm')


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

if __name__ == '__main__':
    print 'For README:'
    print ''
    for module in get_number_modules():
        print ' * %s' % util.get_module_name(module)
    print ''
    print 'For stdnum/__init__.py:'
    print ''
    for module in get_number_modules():
        print '* %s: %s' % (
            module.__name__.replace('stdnum.', ''),
            util.get_module_name(module),
        )
    print ''
    print 'For docs/index.rst:'
    print ''
    for module in get_number_modules():
        print '   %s' % module.__name__.replace('stdnum.', '')
    print ''
    print 'For formats.xml:'
예제 #2
0

# these are excluded
algortihms = (
    'stdnum.verhoeff', 'stdnum.luhn', 'stdnum.iso7064', 'stdnum.damm')


def get_number_modules():
    """Provide 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


if __name__ == '__main__':
    print('For README:')
    print('')
    for module in get_number_modules():
        print(' * %s' % util.get_module_name(module))
    print('')
    print('For docs/index.rst:')
    print('')
    for module in get_number_modules():
        print('   %s' % module.__name__.replace('stdnum.', ''))
    print('')
    print('For formats.xml:')
    print('')
    for module in get_number_modules():
        print('  <li>%s</li>' % util.get_module_name(module))
예제 #3
0
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


if __name__ == '__main__':
    print 'For README:'
    print ''
    for module in get_number_modules():
        print ' * %s' % util.get_module_name(module)
    print ''
    print 'For stdnum/__init__.py:'
    print ''
    for module in get_number_modules():
        print ' * %s: %s' % (
            module.__name__.replace('stdnum.', ''),
            util.get_module_name(module),
        )
    print ''
    print 'For docs/index.rst:'
    print ''
    for module in get_number_modules():
        print '   %s' % module.__name__.replace('stdnum.', '')
    print ''
    print 'For index.xml:'