Pipe stdout/stderr to TXT/HTML (Windows only)
Tested against Windows 10 / Python 3.11 / Anaconda
pip install outerr2html
pip install ansi2html (if you want HTML output too)
from outerr2html import stdout_redirector, libc, config
config.enco = "utf-8"
import sys
import os
import time
with stdout_redirector(
outfolder="c:\\htmltestoutput",
print_stdout=True,
print_stderr=True,
line_limit_out=1000, # creates a new file when limit has been reached
line_limit_err=1000,
sleep_at_end=2,
convert2html=False,
sleep_between_checks=0.1,
):
for h in range(10):
sys.stderr.write("stderr test\n")
sys.stderr.flush() # necessary
os.system("echo console test") # won't be captured with ipython
libc.puts(b"C test") # won't be captured with ipython
libc.fflush(None) # necessary
print("python test ")
print(1234)
time.sleep(1)
print("oi") # not captured
import pandas as pd
from PrettyColorPrinter import add_printer
add_printer(1)
df = pd.read_csv(
r"https://github.com/datasciencedojo/datasets/raw/master/titanic.csv",
engine="python",
on_bad_lines="skip",
encoding="utf-8",
encoding_errors="ignore",
)
with stdout_redirector(
outfolder="c:\\htmltestoutput",
print_stdout=True,
print_stderr=True,
line_limit_out=1000,
line_limit_err=1000,
sleep_at_end=2,
convert2html=False,
sleep_between_checks=0.1,
):
for h in range(10):
sys.stderr.write("stderr test\n")
sys.stderr.flush() # necessary
print(df)
os.system("echo console test") # won't be captured with ipython
libc.puts(b"C test") # won't be captured with ipython
libc.fflush(None) # necessary
print("python test ")
print(1234)
time.sleep(1)
print("oi") # not captured
Metadata
Release files for outerr2html 0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| outerr2html-0.11.tar.gz | 11.9 kB | Without provenance | Details for outerr2html-0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| outerr2html-0.11-py3-none-any.whl | Python 3 | none | any | Details for outerr2html-0.11-py3-none-any.whl |
Total release size: 24.0 kB
Release files / outerr2html-0.11.tar.gz
| Download URL | outerr2html-0.11.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f089cbc6ea18dab7144cf42a305fdcc6edd95f753ed4978edbd3611573321d27
|
|
BLAKE2b-256 checksum How to use checksums |
69d1ff5a5bf7d7ccbe079e821f2b271a6ea47ed13d1fe5e7f41a7131da741baf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / outerr2html-0.11-py3-none-any.whl
| Download URL | outerr2html-0.11-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34407c2f27181972b2a59fca876bb6cae9d996e71fe1428a8fd07a10b9d3db6f
|
|
BLAKE2b-256 checksum How to use checksums |
a760e21ae5cfbf0cc79252acfe33ff84cfa8693047e561119bb21c4cb3fa10c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for outerr2html 0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.