[ctypes-commit] ctypes/codegen/ctypes_codegen codegenerator.py, 1.1, 1.2
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-06-08 19:18:34
|
Update of /cvsroot/ctypes/ctypes/codegen/ctypes_codegen In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14408 Modified Files: codegenerator.py Log Message: Cleanup. When generating the '__all__' list, don't break long strings. Index: codegenerator.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/codegen/ctypes_codegen/codegenerator.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** codegenerator.py 8 Jun 2006 18:46:47 -0000 1.1 --- codegenerator.py 8 Jun 2006 19:18:28 -0000 1.2 *************** *** 2,6 **** # Type descriptions are collections of typedesc instances. ! import typedesc, sys, types ASSUME_STRINGS = True --- 2,7 ---- # Type descriptions are collections of typedesc instances. ! import typedesc, sys ! import textwrap ASSUME_STRINGS = True *************** *** 691,699 **** self.output.write(self.stream.getvalue()) - import textwrap text = "__all__ = [%s]" % ", ".join([repr(str(n)) for n in self.names]) ! for line in textwrap.wrap(text, ! subsequent_indent=" "): print >> self.output, line return loops --- 692,700 ---- self.output.write(self.stream.getvalue()) text = "__all__ = [%s]" % ", ".join([repr(str(n)) for n in self.names]) ! wrapper = textwrap.TextWrapper(break_long_words=False, ! subsequent_indent=" ") ! for line in wrapper.wrap(text): print >> self.output, line return loops |