Registry / devops / reprint

reprint

JSON →
library0.6.0pypypi✓ verified 86d ago

A simple module for Python 2/3 to print and refresh multi-line output contents in terminal. Version 0.6.0 is the latest, currently in maintenance mode.

pip install reprint
INSTALL
IMPORT
SIG · REPRINT
R
reprint
devopspythonv0.6.0
Install
1.6s avg
Import
35ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.030s · 18.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.040s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

reprint
from reprint import output
The main class is 'output' from the reprint module. No common wrong import pattern.
output
from reprint import output
Direct import of the output function/class.

Creates a dynamic multi-line output that refreshes in place. The 'initial_len' sets the number of lines; assign to list indices to update.

import time from reprint import output with output(initial_len=3, interval=0.1) as output_lines: for i in range(10): output_lines[0] = f"Line 1: {i}" output_lines[1] = f"Line 2: {i*2}" output_lines[2] = f"Line 3: {i*3}" time.sleep(0.5)
Debug
Known issues
gotchaThe 'output' context manager must be used with a 'with' statement. Assigning to output_lines indices without the proper context will cause undefined behavior or errors.
fix
Always use 'with output(initial_len=..., interval=...) as output_lines:' and modify output_lines within the block.
affects: all
gotchaThe 'initial_len' parameter is optional but if not set, the output may not have enough lines. Attempting to access an index beyond the current number of lines will raise an IndexError.
fix
Set 'initial_len' to the maximum number of lines you intend to update, or ensure you only update indices within range.
affects: all
deprecatedPython 2 support is not actively maintained. The library may work but is not guaranteed to receive bug fixes for Python 2.
fix
Use Python 3 for best compatibility.
affects: 0.6.0
gotchaThe 'interval' parameter controls refresh rate. Setting it too low (e.g., 0) may cause high CPU usage or terminal flickering.
fix
Use a reasonable interval (>= 0.05) to avoid performance issues.
affects: all
Errors
Common errors & fixes
AttributeError: module 'reprint' has no attribute 'output'
Incorrect import: using 'import reprint' then calling 'reprint.output'
fix
Correct import: from reprint import output
IndexError: list assignment index out of range
Trying to update an index that exceeds the number of lines defined by 'initial_len'
fix
Set 'initial_len' to the number of lines you will modify, or modify only existing indices.
ValueError: I/O operation on closed file.
Attempting to modify output_lines after the 'with' block has exited
fix
Ensure all modifications to output_lines are made within the 'with' block.
Upgrade
Version history
0.6.0latest on PyPI · released Feb 8, 2021
Audit
Dependencies
coloramaoptionalRequired for color support on Windows
Agent activity
6 hits · last 30 days
node
6
Resources
reprint — pip install reprint · libregistry