Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install reindent

How to install Reindent

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install reindent
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.1 Available View build log
0.1.0 Available View build log
Windows (64-bit)
0.1.1 Available View build log
0.1.0 Available View build log
Mac OS X (10.5+)
0.1.1 Available View build log
0.1.0 Available View build log
Linux (32-bit)
0.1.1 Available View build log
0.1.0 Available View build log
Linux (64-bit)
0.1.1 Available View build log
0.1.0 Available View build log
 
Author
License
Public Domain
Imports
Lastest release
version 0.1.1 on Jan 5th, 2011

Released to the public domain, by Tim Peters, 03 October 2000.

Usage:

reindent [-d][-r][-v] [ path ... ]

-d (--dryrun)  Dry run.  Analyze, but don't make any changes to, files.
-r (--recurse) Recurse.  Search for all .py files in subdirectories too.
-v (--verbose) Verbose.  Print informative msgs; else no output.
-h (--help)    Help.     Print this usage information and exit.

Change Python (.py) files to use 4-space indents and no hard tab
characters. Also trim excess spaces and tabs from ends of lines,
and remove empty lines at the end of files.  Also ensure the last line
ends with a newline.

If no paths are given on the command line, reindent operates as a filter,
reading a single source file from standard input and writing the
transformed source to standard output.  In this case, the -d, -r and -v
flags are ignored.

You can pass one or more file and/or directory paths.  When a directory
path, all .py files within the directory will be examined, and, if the -r
option is given, likewise recursively for subdirectories.

If output is not to standard output, reindent overwrites files in place,
renaming the originals with a .bak extension.  If it finds nothing to
change, the file is left alone.  If reindent does change a file,
the changed file is a fixed-point for future runs (i.e., running
reindent on the resulting .py file won't change it again).

The hard part of reindenting is figuring out what to do with comment
lines.  So long as the input files get a clean bill of health from
tabnanny.py, reindent should do a good job.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:7

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.