# Python-import_replaced_try-except **Repository Path**: dycimage/Python-import_replaced_try-except ## Basic Information - **Project Name**: Python-import_replaced_try-except - **Description**: 将python代码中的import 替换为try import...expect... 自动安装缺失的库 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-26 - **Last Updated**: 2022-08-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 说明 将python中的import 替换为 try...expect... 如: ``` import requests ``` 替换为 ```python try:import requests expect ModuleNotFoundError:os.system('pip install requests') ``` # 使用 如[main.py](./main.py)所示 修改后类似为 [test.py](./test.py)所示