tretool 0.2.1__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tretool/__init__.py +37 -12
- tretool/config.py +406 -170
- tretool/decoratorlib.py +423 -0
- tretool/encoding.py +404 -75
- tretool/httplib.py +730 -0
- tretool/jsonlib.py +619 -151
- tretool/logger.py +712 -0
- tretool/mathlib.py +0 -33
- tretool/path.py +19 -0
- tretool/platformlib.py +469 -314
- tretool/plugin.py +437 -237
- tretool/smartCache.py +569 -0
- tretool/tasklib.py +730 -0
- tretool/transform/pdf.py +273 -95
- {tretool-0.2.1.dist-info → tretool-0.3.0.dist-info}/METADATA +8 -4
- tretool-0.3.0.dist-info/RECORD +22 -0
- tretool/markfunc.py +0 -152
- tretool/memorizeTools.py +0 -24
- tretool/writeLog.py +0 -69
- tretool-0.2.1.dist-info/RECORD +0 -20
- {tretool-0.2.1.dist-info → tretool-0.3.0.dist-info}/WHEEL +0 -0
- {tretool-0.2.1.dist-info → tretool-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {tretool-0.2.1.dist-info → tretool-0.3.0.dist-info}/top_level.txt +0 -0
tretool/__init__.py
CHANGED
@@ -3,25 +3,50 @@
|
|
3
3
|
|
4
4
|
## tretool - Python多功能工具库
|
5
5
|
|
6
|
-
[](https://www.python.org/)
|
7
7
|
|
8
8
|
**tretool** 是一个集成常用功能的Python工具库。
|
9
9
|
"""
|
10
10
|
|
11
|
-
|
11
|
+
import sys
|
12
12
|
|
13
|
-
|
13
|
+
MIN_PY_VERSION = (3, 10)
|
14
14
|
|
15
|
-
|
15
|
+
if sys.version_info >= MIN_PY_VERSION:
|
16
|
+
from . import config
|
16
17
|
|
17
|
-
from . import
|
18
|
-
from . import memorizeTools
|
18
|
+
from . import decoratorlib
|
19
19
|
|
20
|
-
from . import
|
21
|
-
from . import platformlib
|
22
|
-
from . import plugin
|
20
|
+
from . import encoding
|
23
21
|
|
24
|
-
from . import
|
25
|
-
from . import transform
|
22
|
+
from . import httplib
|
26
23
|
|
27
|
-
from . import
|
24
|
+
from . import jsonlib
|
25
|
+
|
26
|
+
from . import logger
|
27
|
+
|
28
|
+
from . import path
|
29
|
+
from . import platformlib
|
30
|
+
from . import plugin
|
31
|
+
|
32
|
+
from . import smartCache
|
33
|
+
|
34
|
+
from . import timelib
|
35
|
+
from . import transform
|
36
|
+
|
37
|
+
else:
|
38
|
+
current_version = f"{sys.version_info.major}.{sys.version_info.minor}"
|
39
|
+
required_version = f"{MIN_PY_VERSION[0]}.{MIN_PY_VERSION[1]}"
|
40
|
+
|
41
|
+
raise RuntimeError(
|
42
|
+
f"\n\n"
|
43
|
+
f"不兼容的Python版本\n\n"
|
44
|
+
f"Tretool需要Python {required_version}+ (检测到: Python {current_version})\n"
|
45
|
+
f"请执行以下操作之一:\n"
|
46
|
+
f"1. 升级Python到{required_version}或更高版本\n"
|
47
|
+
f"2. 使用兼容的Tretool版本\n\n"
|
48
|
+
f"升级Python推荐方法:\n"
|
49
|
+
f"- 使用pyenv: `pyenv install 3.10.x`\n"
|
50
|
+
f"- 从官网下载: https://www.python.org/downloads/\n"
|
51
|
+
f"- 使用conda: `conda install python=3.10`"
|
52
|
+
)
|