99.. image :: https://coveralls.io/repos/github/jwodder/inplace/badge.svg?branch=master
1010 :target: https://coveralls.io/github/jwodder/inplace?branch=master
1111
12- .. image :: https://img.shields.io/pypi/pyversions/inplace .svg
12+ .. image :: https://img.shields.io/pypi/pyversions/in_place .svg
1313
14- .. image :: https://img.shields.io/github/license/jwodder/inplace .svg?maxAge=2592000
14+ .. image :: https://img.shields.io/github/license/jwodder/in_place .svg?maxAge=2592000
1515 :target: https://opensource.org/licenses/MIT
1616 :alt: MIT License
1717
1818`GitHub <https://github.com/jwodder/inplace >`_
19- | `PyPI <https://pypi.python.org/pypi/inplace >`_
19+ | `PyPI <https://pypi.python.org/pypi/in_place >`_
2020| `Issues <https://github.com/jwodder/inplace/issues>`_
2121
22- The ``inplace `` module provides Python classes for reading & writing a file
22+ The ``in_place `` module provides Python classes for reading & writing a file
2323"in-place": data that you write ends up at the same filepath that you read
24- from, and ``inplace `` takes care of all the necessary mucking about with
24+ from, and ``in_place `` takes care of all the necessary mucking about with
2525temporary files for you.
2626
2727For example, given the file ``somefile.txt ``::
@@ -33,9 +33,9 @@ For example, given the file ``somefile.txt``::
3333
3434and the program ``disemvowel.py ``::
3535
36- import inplace
36+ import in_place
3737
38- with inplace .InPlace('somefile.txt') as fp:
38+ with in_place .InPlace('somefile.txt') as fp:
3939 for line in fp:
4040 fp.write(''.join(c for c in line if c not in 'AEIOUaeiou'))
4141
@@ -51,14 +51,14 @@ and no sign of those pesky vowels remains! If you want a sign of those pesky
5151vowels to remain, you can instead save the file's original contents in, say,
5252``somefile.txt~ `` by constructing the filehandle with::
5353
54- inplace .InPlace('somefile.txt', backup_ext='~')
54+ in_place .InPlace('somefile.txt', backup_ext='~')
5555
5656or save to ``someotherfile.txt `` with::
5757
58- inplace .InPlace('somefile.txt', backup='someotherfile.txt')
58+ in_place .InPlace('somefile.txt', backup='someotherfile.txt')
5959
6060Compared to the in-place filtering implemented by the Python standard library's
61- |fileinput |_ module, ``inplace `` offers the following benefits:
61+ |fileinput |_ module, ``in_place `` offers the following benefits:
6262
6363- Instead of hijacking ``sys.stdout ``, a new filehandle is returned for
6464 writing.
@@ -69,8 +69,8 @@ Compared to the in-place filtering implemented by the Python standard library's
6969 binary mode, and these options apply to both input and output.
7070- The complete filename of the backup file can be specified; you aren't
7171 constrained to just adding an extension.
72- - When used as a context manager, ``inplace `` will restore the original file if
73- an exception occurs.
72+ - When used as a context manager, ``in_place `` will restore the original file
73+ if an exception occurs.
7474- The creation of temporary files won't silently clobber innocent bystander
7575 files.
7676
@@ -81,14 +81,14 @@ Compared to the in-place filtering implemented by the Python standard library's
8181Installation
8282============
8383Just use `pip <https://pip.pypa.io >`_ (You have pip, right?) to install
84- ``inplace `` and its dependencies::
84+ ``in_place `` and its dependencies::
8585
86- pip install inplace
86+ pip install in_place
8787
8888
8989Basic Usage
9090===========
91- ``inplace `` provides two classes: ``InPlace ``, for working with text files
91+ ``in_place `` provides two classes: ``InPlace ``, for working with text files
9292(reading & writing ``unicode `` objects in Python 2, ``str `` objects in Python
93933); and ``InPlaceBytes ``, for working with binary files (reading & writing
9494``str `` objects in Python 2, ``bytes `` objects in Python 3). Both classes'
0 commit comments