Python Mass Editor

Massively edit multiple files using Python text processing modules
Download

Python Mass Editor Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Jerome Lecomte
  • Publisher web site:
  • http://github.com/elmotec/

Python Mass Editor Tags


Python Mass Editor Description

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.UsageYou probably will need to know the basics of the Python re module (regular expressions).usage: massedit.py file Python based mass file editorpositional 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*.pyor if massedit is installed as a package (from pypi for instance) :python -mmassedit -e "re.sub('assertEquals', 'assertEqual', line)" test_pre_python_33.pyInstallationDownload massedit.py from http://github.com/elmotec/massedit or :pip install masseditProduct's homepage


Python Mass Editor Related Software