PythonTidy
Chuck Rhode
CRhode at LacusVeris.com
Sat Dec 2 14:10:25 EST 2006
Thomas Heller wrote this on Fri, Dec 01, 2006 at 10:12:38PM +0100. My reply is below.
> Chuck Rhode schrieb:
> > o Command-line args: Please give an example of a standard command that
> > I might emulate w.r.t. standard argument use.
> Well, at least it would be nice if I could call
> 'PythonTidy.py mymodule.py' to tidy up the mymodule.py file.
I've uploaded a new version of PythonTidy:
o http://www.lacusveris.com/PythonTidy/PythonTidy-1.4.python
It fixes several problems. Also it allows file names as arguments.
> Here is part of a diff before and after running PythonTidy on it:
> <start>
> - def comptr_setitem(self, index, value):
> - # We override the __setitem__ method of the
> - # POINTER(POINTER(interface)) type, so that the COM
> - # reference count is managed correctly.
> + def comptr_setitem(self, index, value): # We override the __setitem__ method of the
> + # POINTER(POINTER(interface)) type, so that the COM
> + # reference count is managed correctly.
> Can this be customized?
This problem has been fixed I think. No customization should be
required to keep block comments from being rendered as in-line
comments.
Wolfgang Grafen reported that PythonTidy crashed in Python-2.4 because
new Abstract Syntax Tree node types introduced in Python-2.5 weren't
available. It was trivial to check availability, so PythonTidy should
now run in Python-2.4. However, this has not been thoroughly tested
and is not guaranteed.
PythonTidy can now recode string literals if required, although this
capability is turned off by default. See RECODE_STRINGS.
Docstrings will henceforward be enclosed in double quotes when
feasible.
--
.. Chuck Rhode, Sheboygan, WI, USA
.. Weather: http://LacusVeris.com/WX
.. 30° — Wind WSW 10 mph — Sky overcast.
More information about the Python-list
mailing list