Skip to main content

Python module that blocks the standard output, preventing print statements from being displayed

Project description

Block Stdout

A context manager that blocks the standard output when wrapped around print statements.

Installation

python -m pip install block-stdout

Usage

from blockstdout import BlockPrint


def printer():
    print('I will not be printed')

def tester():
    print('I will be printed')
    with BlockPrint():
        printer()
    print('I will also be printed')

if __name__ == '__main__':
    tester()

Pypi Package

pypi-module

License & copyright

© Vignesh Rao

Licensed under 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

block_stdout-0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file block_stdout-0.3-py3-none-any.whl.

File metadata

  • Download URL: block_stdout-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for block_stdout-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bfdfd03a1e3544dd22df740e98b299217b17c46889163ad425620fa266a1a66a
MD5 65fb134512aa5b507d20198941bad4e3
BLAKE2b-256 039b817920eac1cdc29b710c3ab5dc41301e8574a278371040bbf89d2c6832b4

See more details on using hashes here.

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