On Tuesday, May 19, 2015 at 2:51:48 PM UTC-5, Edward K. Ream wrote:

As of rev 315bb24, Leo now uses the tweaked PythonTidy code for *all* 
> python-oriented pretty printing.  The old token-oriented code was hopeless 
> and has been moved to the attic.
>

[Sounds of wailing and gnashing of teeth.]

I have spent at least 12 hours of uninterrupted programming yesterday and 
late last night getting the PythonTidy code to the point where it could be 
used to beautify Leo's code.  That may still happen.

However, as discussed at #191 
<https://github.com/leo-editor/leo-editor/issues/191>, PythonTidy is 
obsolete.  Instead, the pep8 and autopep8 packages are getting thousands of 
downloads a month. Here are the choices:

*1. Bull ahead with PythonTidy*.

Advantages: Can probably be finished today, at least for Python 2.

Disadvantages: Requires some more hacks to handle all nodes. Porting to 
Python 3 may be difficult, or even practically impossible.  It depends on 
whether Ast nodes change from 2 to 3.

*2. Run autopep8 in a separate process* on external files, not on Leo's 
outline.

Advantage: Uses best technology.

Disadvantages: Requires users to install the pep8 and autopep8 packages. 
Requires a rewrite of the code.

For now, I'll carry on with the PythonTidy code, provided that it can be 
ported to Python 3.  If not, there will be no alternative but to transition 
to autopep8.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to