Created
November 30, 2020 19:14
-
-
Save lewoudar/083eca20d3e162ee5540038563cf6565 to your computer and use it in GitHub Desktop.
Example of less command implemented with click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
@click.command() | |
@click.argument('file', type=click.File()) | |
def cli(file): | |
"""Read file part by part""" | |
click.echo_via_pager(file.read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment