Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Quality Assurance and Testing

    Reindent 0.1.1

    Download button

    No screenshots available
    Downloads: 147  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dan Buch | More programs
    Public Domain / FREE
    October 25th, 2010, 13:59 GMT
    ROOT / Programming / Quality Assurance and Testing

     Read user reviews (0)  Refer to a friend  Subscribe

    Reindent description

    Reindent script by Tim Peters

    Reindent is a Python script written by Tim Peters.

    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.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    reindent script | Python library | Python | reindent | script

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM