473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PythonTidy 1.10

PythonTidy cleans up, regularizes, and reformats the text of Python
scripts.

It is released under the GNU General Public License.

Python scripts are usually so good looking that no beautification is
required. However, from time to time, it may be necessary to alter
the style to conform to changing standards. This script converts
programs in a consistent way. It abstracts the pretty presentation of
the symbolic code from the humdrum process of writing it and getting
it to work.

This is an upgrade. There was a big problem with earlier versions:
Canonical values were substituted for strings and numbers. For
example, decimal integers were substituted for hexadecimal, and
escaped strings for raw strings. Authors of Python scripts usually
use peculiar notations for peculiar purposes, and doing away with the
peculiarity negatively impacts the readability of the code.

This version preserves the original constants (parsed by *tokenize*)
in a literal pool indexed by the value they evaluate to. The
canonical values (output by *compiler*) are then translated back (when
possible) to the original constants by looking them up in the literal
pool.

--
<P><A
HREF="http://www.lacusveris.com/PythonTidy/PythonTidy-1.10.python">PythonTidy
1.10</A- Cleans up, regularizes, and reformats the text of Python
scripts. (18-Jan-07)</P>

... Chuck Rhode, Sheboygan, WI, USA
... mailto:CR****@LacusVeris.com?subject=PythonTidy
... Weather: http://LacusVeris.com/WX
... 20° — Wind WNW 13 mph

Jan 18 '07 #1
0 914

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Boddie | last post by:
QOTW: "We of all people should understand Worse Is Better. And I forgot to mention a little flash in the pan called Python, for which Tkinter (2+2 left as an exercise) is the GUI of choice." - Ken...
2
by: Chuck Rhode | last post by:
That went well. PythonTidy has been looked at at least 10**2 times, and I have received a couple of complaints, which I hope I have addressed satisfactorily -- plenty good enough for a beta test. ...
9
by: siggi | last post by:
Hi all, as a newbie I have problems with formatting code of downloaded programs, because IDLE's reformatting capabilities are limited . Incorrect indentation, mixing of TAB with BLANKs or eol...
8
by: Vincent Delporte | last post by:
Hello When I copy/paste Python code from the web, every so often, the TABs are wrong, which means that the code won't work and I have to manually reformat the code. Is there a code reformater...
18
by: Franz Steinhaeusler | last post by:
Hello, I did not find any reasonable pyhton source code beautifier program (preferable gui). Some would ask why? Program it immediatly good. (BTW: Would be a nice project, if I would have more...
7
by: montyphyton | last post by:
Some recent posts about Python programming style got me thinking. Since we have the PEP 8 which gives some guidelines about the style to be used, do we have any program that can check for...
5
by: David | last post by:
All, Is there a pretty printing utility for Python, something like Tidy for HTML? That will change: xp=self.uleft+percentx*(self.xwidth) To:
5
by: Bret | last post by:
Does anyone know of a package that can be used to "fix" bad formatting in Python code? I don't mean actual errors, just instances where someone did things that violate the style guide and render...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.