Skip to main content

Print a message with an indefinite loader

Project description

Print Loader

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install print-loader

Introduction

Sometimes you want to put an indefinite loader for a set of statements to see the progress in terminal. This package tries to solve that exact problem.

Examples

from print_loader import printl
import time

with printl("Sleeping"):
    time.sleep(3)

with printl("Sleeping", update_every=0.1):
    time.sleep(3)

with printl("Sleeping", update_every=0.1, loading_chars=["-", "|"]):
    time.sleep(3)

with open("large_file.txt", "w") as fp, printl("Writing to file"):
    for i in range(50000):
        fp.write(str(i) * 30000 + "\n")

License

print-loader is distributed under the terms of the MIT license.

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

print_loader-0.0.1a4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

print_loader-0.0.1a4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page