Skip to main content

pypi version build status

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.0.zip (7.3 kB view details)

Uploaded Source

File details

Details for the file changewords-1.0.0.zip.

File metadata

  • Download URL: changewords-1.0.0.zip
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for changewords-1.0.0.zip
Algorithm Hash digest
SHA256 bea46d4e2365732fc62dbbe175c0f2af118eeb589fb6503dcba1c685f7aed65d
MD5 e406c7f90be8eb65898a9e59564271dc
BLAKE2b-256 648d27a35f5dff2688b3aa092739a28a2771a559abd00fbca8f5ee4a1634e4b2

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

This release

1.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page