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 > Libraries

    Python Mass Editor 0.61

    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:
    Jerome Lecomte | More programs
    MIT/X Consortium Lic... / FREE
    July 10th, 2012, 00:50 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Python Mass Editor description

    Massively edit multiple files using Python text processing modules

    Python Mass Editor is a Python module that implements a python mass editor class to process multiple files using Python code. The modification(s) is (are) shown on stdout as a diff output. One can then modify the target file(s) in place with the -w/--write option.

    Usage

    You probably will need to know the basics of the Python re module (regular expressions).

    usage: massedit.py [-h] [-v] [-w] [-V] [-e EXPRESSIONS] file [file ...]

    Python based mass file editor

    positional arguments:
     file file to process with the expression. Modified in
     place.

    optional arguments:
     -h, --help show this help message and exit
     -v, --version show program's version number and exit
     -w, --write modify target file(s) in place
     -V, --verbose increases log verbosity (can be specified multiple
     times)
     -e EXPRESSIONS, --expression EXPRESSIONS
     Python expressions to be applied on all files. Use the
     line variable to reference the current line.

    example: massedit.py -e "re.sub('failIf', 'assertFalse', line)" test*.py


    or if massedit is installed as a package (from pypi for instance) :

    python -mmassedit -e "re.sub('assertEquals', 'assertEqual', line)" test_pre_python_33.py

    Installation

    Download massedit.py from http://github.com/elmotec/massedit or :

    pip install massedit


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Added massedit.edit_files function to ease usage as library instead of as a command line tool (suggested by Maxim Veksler).

      


    TAGS:

    text processing | Python library | Python modules | Python | modules | editor

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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