Sha256: 9eba5354f6d42f9506b6fd69f119815d3ef15cfc0bbeaeebb58d00bfcc0578ad
Contents?: true
Size: 640 Bytes
Versions: 6
Compression:
Stored size: 640 Bytes
Contents
#!/usr/bin/env python try: import locale locale.setlocale(locale.LC_ALL, '') except: pass import codecs import sys from transform import transform from docutils.writers.html4css1 import Writer def main(): return transform(writer=Writer(), part='html_body') if __name__ == '__main__': # Python 2 wants an encoded string for unicode, while Python 3 views an # encoded string as bytes and asks for a string. Solution via: # http://stackoverflow.com/a/24104423 if sys.version_info[0] < 3: UTF8Writer = codecs.getwriter('utf8') sys.stdout = UTF8Writer(sys.stdout) sys.stdout.write(main())
Version data entries
6 entries across 6 versions & 1 rubygems