{"id":24518,"library":"reprint","title":"reprint","description":"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.","status":"maintenance","version":"0.6.0","language":"python","source_language":"en","source_url":"https://github.com/Yinzo/reprint","tags":["terminal","multi-line","output","refresh"],"install":[{"cmd":"pip install reprint","lang":"bash","label":"Standard installation"}],"dependencies":[{"reason":"Required for color support on Windows","package":"colorama","optional":true}],"imports":[{"note":"The main class is 'output' from the reprint module. No common wrong import pattern.","wrong":"","symbol":"reprint","correct":"from reprint import output"},{"note":"Direct import of the output function/class.","wrong":"","symbol":"output","correct":"from reprint import output"}],"quickstart":{"code":"import time\nfrom reprint import output\n\nwith output(initial_len=3, interval=0.1) as output_lines:\n    for i in range(10):\n        output_lines[0] = f\"Line 1: {i}\"\n        output_lines[1] = f\"Line 2: {i*2}\"\n        output_lines[2] = f\"Line 3: {i*3}\"\n        time.sleep(0.5)","lang":"python","description":"Creates a dynamic multi-line output that refreshes in place. The 'initial_len' sets the number of lines; assign to list indices to update."},"warnings":[{"fix":"Always use 'with output(initial_len=..., interval=...) as output_lines:' and modify output_lines within the block.","message":"The '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.","severity":"gotcha","affected_versions":"all"},{"fix":"Set 'initial_len' to the maximum number of lines you intend to update, or ensure you only update indices within range.","message":"The '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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Python 3 for best compatibility.","message":"Python 2 support is not actively maintained. The library may work but is not guaranteed to receive bug fixes for Python 2.","severity":"deprecated","affected_versions":"0.6.0"},{"fix":"Use a reasonable interval (>= 0.05) to avoid performance issues.","message":"The 'interval' parameter controls refresh rate. Setting it too low (e.g., 0) may cause high CPU usage or terminal flickering.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Correct import: from reprint import output","cause":"Incorrect import: using 'import reprint' then calling 'reprint.output'","error":"AttributeError: module 'reprint' has no attribute 'output'"},{"fix":"Set 'initial_len' to the number of lines you will modify, or modify only existing indices.","cause":"Trying to update an index that exceeds the number of lines defined by 'initial_len'","error":"IndexError: list assignment index out of range"},{"fix":"Ensure all modifications to output_lines are made within the 'with' block.","cause":"Attempting to modify output_lines after the 'with' block has exited","error":"ValueError: I/O operation on closed file."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}