{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"}],"enrichment":{"capability":"Captures C-level stdout and stderr output in Python using os.dup2, allowing you to intercept and redirect output from native libraries and compiled code that bypasses Python's standard I/O.","skillfed_tags":["c-interop","io-redirection","jupyter-integration"],"use_cases":["Capture and verify output from C extensions or compiled libraries in unit tests.","Display C-level output in Jupyter notebooks by enabling the wurlitzer IPython extension.","Redirect native library output to Python loggers for centralized log management.","Suppress or forward output from blocking C functions that hold the GIL.","Debug integration issues between Python and native code by inspecting captured output."],"what_it_does":"Wurlitzer lets you capture output produced directly by C code and native libraries\u2014output that normally bypasses Python's sys.stdout and sys.stderr. It works by using os.dup2 to redirect file descriptors at the OS level, making it possible to intercept output from compiled extensions, system calls, and third-party C libraries that write directly to stdout/stderr.\n\nThe package provides context managers (pipes, sys_pipes) and integrates with Python's logging module and file objects. It's particularly useful in Jupyter notebooks and IPython environments where you want to display C-level output in cell results, and in testing scenarios where you need to verify or suppress output from native code.","worth_installing":"Yes. Wurlitzer solves a specific, hard problem (capturing C-level I/O) with a clean API, has no dependencies, is actively maintained, carries an MIT license, and has no known vulnerabilities. Install it if you work with native extensions, compiled libraries, or need output capture in Jupyter\u2014otherwise it's not necessary."},"id":"wurlitzer","links":{"html":"https://skillfed.io/packages/wurlitzer","md":"https://skillfed.io/packages/wurlitzer.md","pypi":"https://pypi.org/project/wurlitzer/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-06-12","license_spdx":null,"license_treatment":"permissive","name":"wurlitzer","python_support":"supports_current","summary":"Capture C-level output in context managers"},"popularity":{"monthly_downloads":1832013,"position":3510,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.1.1"}
