{"id":24388820,"url":"https://github.com/nitsc/real-time-python","last_synced_at":"2025-10-08T19:19:37.899Z","repository":{"id":273040831,"uuid":"865883644","full_name":"nitsc/Real-time-Python","owner":"nitsc","description":"RTPY（实时Python）是一个 Python 脚本，旨在根据配置文件的设定频率，自动执行指定的 Python 程序。该工具适用于需要频繁调试的代码。","archived":false,"fork":false,"pushed_at":"2025-01-18T07:35:59.000Z","size":6005,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T19:19:36.518Z","etag":null,"topics":["auto-run","auto-runner","automation","convenient","debug","debugging-tool","development","program","programming","programming-language","python","python3","real-time","realtime","realtime-processing","smart","subprocess","system","text","time"],"latest_commit_sha":null,"homepage":"https://blog.csdn.net/zwa20110606/article/details/142672981?sharetype=blogdetail\u0026sharerId=142672981\u0026sharerefer=PC\u0026sharesource=zwa20110606\u0026spm=1011.2480.3001.8118","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitsc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-01T09:47:27.000Z","updated_at":"2025-01-18T07:36:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"3774b915-3ebb-4191-80ec-9dfa999aafd6","html_url":"https://github.com/nitsc/Real-time-Python","commit_stats":null,"previous_names":["nitsc/real-time-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nitsc/Real-time-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsc%2FReal-time-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsc%2FReal-time-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsc%2FReal-time-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsc%2FReal-time-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitsc","download_url":"https://codeload.github.com/nitsc/Real-time-Python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitsc%2FReal-time-Python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000701,"owners_count":26082805,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["auto-run","auto-runner","automation","convenient","debug","debugging-tool","development","program","programming","programming-language","python","python3","real-time","realtime","realtime-processing","smart","subprocess","system","text","time"],"created_at":"2025-01-19T14:57:20.685Z","updated_at":"2025-10-08T19:19:37.888Z","avatar_url":"https://github.com/nitsc.png","language":"Python","readme":"# Realtime Python （rtpy.py） 使用说明\n---\n\n## 概述\n![RealtimePython](https://github.com/user-attachments/assets/d33cbbfc-d22a-4dc8-9ad6-b1b4716f190d)\n\n`Realtime Python（rtpy.py）` 是一个 Python 脚本，旨在根据配置文件的设定频率，自动执行指定的 Python 程序。该工具适用于需要频繁调试的代码。\n\n## 文件结构\n\n- **rtpy.py**: 主程序文件，负责读取配置文件并定期运行指定的 Python 脚本。\n- **py文件**: 包含 执行频率 和 Python解释器路径 以及 脚本。\n\n## py文件格式\n\npy文件必须包含以下两行：\n1. 执行频率（公式：停顿时间 * 60）。\n2. Python 解释器的路径。\n3. Python 脚本\n\n示例配置文件内容：\n```\n# 120\n# C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python311\\\\python.exe\na = input(\"what is your name? \")\nprint(\"hello \" + a + \"!\")\n```\n其中，第一行使得 Python Realtime 每2秒执行一次代码，第二行是 Python 解释器的路径，第三行和以后是 Python 脚本。\n\n## 使用方法\n\n1. 使用已打包的 EXE 文件（rtpy.exe）：\n   ```bash\n   rtpy \u003c脚本文件路径\u003e\n   ```\n   例如：\n   ```bash\n   rtpy text.py\n   ```\n\n2. 程序将读取文件中的执行频率和 Python 解释器路径，并根据设定的频率定期运行指定的 Python 脚本。\n\n## 主要功能\n\n- **读取配置文件**: `read_config(path)` 负责读取文件，并返回执行频率和 Python 解释器路径。\n- **执行脚本**: `job(path, py_path)` 根据文件中的解释器路径执行指定的 Python 脚本。\n- **定期执行**: `run()` 是主函数，它读取命令行参数，获取配置文件路径，并启动定期执行任务的循环。\n\n## 注意事项\n\n- 确保py文件格式正确，否则程序会提示格式错误。\n- 该脚本只经过 Windows11 的测试，其余系统没经测试，可能需要略微调整。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitsc%2Freal-time-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitsc%2Freal-time-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitsc%2Freal-time-python/lists"}