file_read_backwards
Memory efficient way of reading files line-by-line from the end of file
Free software: MIT license
Documentation: https://file-read-backwards.readthedocs.io.
Features
This package is for reading file backward line by line as unicode in a memory efficient manner for both Python 2.7 and Python 3.
It currently supports ascii, latin-1, and utf-8 encodings.
It supports “\r”, “\r\n”, and “\n” as new lines.
Usage Examples
An example of using file_read_backwards for python2.7:
#!/usr/bin/env python2.7
from file_read_backwards import FileReadBackwards
f = FileReadBackwards("/tmp/file", encoding="utf-8")
# getting lines by lines starting from the last line up
for l in f:
print l
# do it again
for l in f:
print l
Another example using python3.3:
#!/usr/bin/env python3.3
from file_read_backwards import FileReadBackwards
f = FileReadBackwards("/tmp/file", encoding="utf-8")
# getting lines by lines starting from the last line up
for l in f:
print(l)
# do it again
for l in f:
print(l)
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
1.0.0 (2016-12-18)
First release on PyPI.
1.1.0 (2016-12-31)
Added support for “latin-1”.
Marked the package “Production/Stable”.
1.1.1 (2017-01-09)
Updated README.rst for more clarity around encoding support and Python 2.7 and 3 support.
1.1.2 (2017-01-11)
Documentation re-arrangement. Usage examples are now in README.rst
Minor refactoring
Metadata
Release files for file-read-backwards 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| file_read_backwards-1.1.2.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| file_read_backwards-1.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 26.2 kB
Release files / file_read_backwards-1.1.2.tar.gz
| Download URL | file_read_backwards-1.1.2.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0bd5c28efc53fbd5fbdf97742f1aca3559f80cc82844690bdf2c3ccc69c7ce3
|
|
BLAKE2b-256 checksum How to use checksums |
c8bac8e0a94d40fb175bc8a701a96f8c050e98903d0e025d188af3e665f820ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / file_read_backwards-1.1.2-py2.py3-none-any.whl
| Download URL | file_read_backwards-1.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0a9aadfdc91632bd36862f113620dd6b725f72945f3823357bd5b31bf45d3eb1
|
|
BLAKE2b-256 checksum How to use checksums |
6de9ff8bf3a60489cd36b7cd30cf174c4e3a4176e0db77aa78236dac1e049b45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |