https://github.com/nriver/loguru-helper
replace all print with logger.info for loguru module
https://github.com/nriver/loguru-helper
Last synced: 12 months ago
JSON representation
replace all print with logger.info for loguru module
- Host: GitHub
- URL: https://github.com/nriver/loguru-helper
- Owner: Nriver
- License: agpl-3.0
- Created: 2021-12-17T06:46:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T09:52:33.000Z (over 4 years ago)
- Last Synced: 2025-03-02T21:31:24.590Z (over 1 year ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# loguru-helper
将python的print语句批量替换成loguru的logger.info
replace all print with logger.info for loguru module
# 使用方法
可以用[Release](https://github.com/Nriver/loguru-helper/releases)里面打包的exe
把`.py`文件拖到exe上就会进行转换, 会在目标文件同目录下生成一个 `_mod.py` 结尾的文件
# 使用命令行调用
可以用命令行运行
将同目录下的 `target_file.py` 转换成 `target_file_mod.py`
```
python3 loguru_helper.py
```
转换其它文件
```
python3 loguru_helper.py target_file.py
```
会在目标文件同目录下生成一个 `_mod.py` 结尾的文件