Huge file viewer control for prompt-toolkit
Project description
pthugefileviewer
pthugefileviewer is a control for prompt-toolkit that can display huge files. It does so by mmap'ing the file and only reading the lines shown in the screen. It avoids any operation that would require reading the whole file, like counting the lines.
Installation
Releases
pthugefileviewer can be installed via pypi:
pip install pthugefileviewer
For nix users, it is also available as a flake.
Repository
We can also clone the github repository and install pthugefileviewer from it with:
pip install .
We can also install it for the current user only by running instead:
pip install --user .
Development
pthugefileviewer uses the standard python3 infra. To develop and test the module:
- Clone the repository and go into the directory:
git clone git@github.com:lpenz/pthugefileviewer.git cd pthugefileviewer
- Use
venv
to create a local virtual environment withpython -m venv venv
- Activate the environment by running the shell-specific
activate
script in./venv/bin/
. For [fish], for instance, run:source ./venv/bin/activate.fish
- Install pthugefileviewer in "editable mode":
pip install -e '.[test]'
- To run the tests:
Or, to run the tests with coverage:pytest
pytest --cov
- Finally, to exit the environment and clean it up:
deactivate rm -rf venv
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pthugefileviewer-0.1.1.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for pthugefileviewer-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 950ac46349808235fce1b3b3f25b389792afa8e82080589ec825aa80ec4a3df3 |
|
MD5 | fe35cc8417e17e32521ecd29354a8985 |
|
BLAKE2b-256 | 88b6ad2c99a4f4f2f86f166073ddbd605886e2d164d4281fed4a28dd6724238e |