Simply python tool to change or replace the strings in files. This tool pretty nice for programmers if somehow they want to replace/change their codes for any files, eg: function, class, variable, etc for recursive files or not.
Installation
Install from PyPI:
$ pip install changewords
Usage
usage: changewords.py [-h] [-p PATH] [-ft FILE_TYPE] [-fs FROM_STRING]
[-ts TO_STRING]
Python tool to change or replace the strings in files.
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH the file type you are looking for. eg: '.py', '.txt'
by default is current path/folder.
-ft FILE_TYPE, --file_type FILE_TYPE
file type you are looking for, eg: '.py', '.txt'
-fs FROM_STRING, --from_string FROM_STRING
the string to change/replace
-ts TO_STRING, --to_string TO_STRING
the string replacement
Example
$ changewords -p=changewords_test -ft=.py -fs=helloworld -ts=mantabjiwa # or $ changewords --path=changewords_test --file_type=.py --from_string=helloworld --to_string=mantabjiwa
Running tests
To run the test use:
$ python tests.py
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
changewords-1.0.1.tar.gz
(3.7 kB
view details)
File details
Details for the file changewords-1.0.1.tar.gz.
File metadata
- Download URL: changewords-1.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
Python-urllib/3.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7203d07fc3360e294bdb0066fc2a1295ad62afff8c30f880f3d6deabfecad517
|
|
| MD5 |
d7026f59ee71339419faec36e4a3643d
|
|
| BLAKE2b-256 |
db3b333afc81d8e14d72e7d5b217eecd0b15c0b63f5f288c08a0bac12a59ab4f
|