{"id":16538723,"url":"https://github.com/spyoungtech/pywinconsolebuffer","last_synced_at":"2025-07-08T01:36:01.631Z","repository":{"id":146395566,"uuid":"254819888","full_name":"spyoungtech/PyWinConsoleBuffer","owner":"spyoungtech","description":"ctypes wrapper for a console buffer for multi-line text writing and re-writing.","archived":false,"fork":false,"pushed_at":"2020-04-11T08:15:57.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T00:44:42.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spyoungtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-11T07:57:29.000Z","updated_at":"2020-04-11T08:16:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a954aaef-2bcc-48ca-847d-a4e041cbd17c","html_url":"https://github.com/spyoungtech/PyWinConsoleBuffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spyoungtech/PyWinConsoleBuffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2FPyWinConsoleBuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2FPyWinConsoleBuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2FPyWinConsoleBuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2FPyWinConsoleBuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spyoungtech","download_url":"https://codeload.github.com/spyoungtech/PyWinConsoleBuffer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2FPyWinConsoleBuffer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264176017,"owners_count":23568583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T18:46:31.747Z","updated_at":"2025-07-08T01:36:01.582Z","avatar_url":"https://github.com/spyoungtech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyWinConsoleBuffer\nctypes wrapper for a console buffer for multi-line text writing and re-writing.\n\n\n\n# Usage\n\nThe main usage is for moving the write cursor along the buffer to write and update text.\n\nExample updating 3 lines of text:\n\n```python\nfrom console_buffer import ConsoleBuffer, get_console_handle\nimport random\nimport time\n\nbuffer = ConsoleBuffer(100, 3)  # 3 line buffer with width of 100\nhandle = get_console_handle()\nwhile True:\n    line_one = f'One: {random.random()}'\n    line_two = f'Two: {random.random()}'\n    line_three = f'Three: {random.random()}'\n    for index, line in enumerate([line_one, line_two, line_three]):\n        buffer.set_position(0, index)\n        buffer.write(line)\n    buffer.show(handle)\n    time.sleep(0.1)\n```\n\n\n## TODO\n\n- [ ] Implement a writeline that takes care of trailing whitespace (ensuring previous text does not dangle at the tail)  \n- [ ] Get the properties of the console to determine the width/height of the console as potential default  \n- [ ] Allow the buffer to start somewhere other than origin (0, 0)\n- [ ] Factor the console handle as a default in show method\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspyoungtech%2Fpywinconsolebuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspyoungtech%2Fpywinconsolebuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspyoungtech%2Fpywinconsolebuffer/lists"}