Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Recursively find and replace in file names and contents.

Project Description
usage: pyreplace [-h] [-d DIRECTORY] [-r] [-v] [-g EXPRESSION]
[-f FIND REPLACE] [-fi] [-c FIND REPLACE] [-ci]

Recursively find and replace in file names and contents.

optional arguments:
-h, --help show this help message and exit
-d DIRECTORY, --directory DIRECTORY
Set starting directory.
-r, --dry-run Dont make any changes, just list what would happen.
-v, --verbose Display changes made.
-g EXPRESSION, --glob EXPRESSION
Find files with matching extension. Example: *.txt
-f FIND REPLACE, --filename FIND REPLACE
Search filename for FIND and replace with REPLACE.
-fi, --filename-insensitive
Ignore capital/lowercase when searching filename.
-c FIND REPLACE, --contents FIND REPLACE
Search contents for FIND and replace with REPLACE.
-ci, --contents-insensitive
Ignore capital/lowercase when searching contents.

Usage Examples:
Replace foo with bar in filenames matching *.txt:
pyreplace -g *.txt -f foo bar

Find and replace foo with bar in files matching *.txt (Contents):
pyreplace -g *.txt -c foo bar

As above with all files in current directory:
pyreplace -c foo bar

As above with all files in another directory:
pyreplace -d /home/foo -c foo bar
Release History

Release History

This version
History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyreplace-1.0-py3.2.egg (5.2 kB) Copy SHA256 Checksum SHA256 3.2 Egg Aug 25, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting