Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16722 > unrolled thread
| Started by | "Pedro Henrique G. Souto" <pedro.h.souto@gmail.com> |
|---|---|
| First post | 2011-12-06 10:17 -0200 |
| Last post | 2011-12-06 10:17 -0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: whitespace cleanup "Pedro Henrique G. Souto" <pedro.h.souto@gmail.com> - 2011-12-06 10:17 -0200
| From | "Pedro Henrique G. Souto" <pedro.h.souto@gmail.com> |
|---|---|
| Date | 2011-12-06 10:17 -0200 |
| Subject | Re: whitespace cleanup |
| Message-ID | <mailman.3344.1323173840.27778.python-list@python.org> |
On 06/12/2011 10:06, Chris Angelico wrote: > On Tue, Dec 6, 2011 at 10:59 PM, Andrea Crotti > <andrea.crotti.0@gmail.com> wrote: >> Well it's not so simple, I clearly don't want to strip out whitespace in the >> beginning of the line, >> or my nice code will break miserably ;) > > The question is: What is "wrong" whitespace? Whatever you declare to > be wrong, you can probably come up with a regexp or other spec that > will catch it (or conversely, declare some pattern to be "right" and > look for anything else). > > ChrisA Something like PythonTidy does what you want? http://pypi.python.org/pypi/PythonTidy If you like to write your own script, or if what you want is similar, but not the same, the source code is a good place to start: http://lacusveris.com/PythonTidy/PythonTidy-1.20.python -- Att; Pedro Henrique G. Souto <pedro.h.souto@gmail.com>
Back to top | Article view | comp.lang.python
csiph-web