pycoze 0.1.57__py3-none-any.whl → 0.1.59__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.
- pycoze/utils/arg.py +9 -7
- {pycoze-0.1.57.dist-info → pycoze-0.1.59.dist-info}/METADATA +1 -1
- {pycoze-0.1.57.dist-info → pycoze-0.1.59.dist-info}/RECORD +6 -6
- {pycoze-0.1.57.dist-info → pycoze-0.1.59.dist-info}/LICENSE +0 -0
- {pycoze-0.1.57.dist-info → pycoze-0.1.59.dist-info}/WHEEL +0 -0
- {pycoze-0.1.57.dist-info → pycoze-0.1.59.dist-info}/top_level.txt +0 -0
pycoze/utils/arg.py
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
-
import argparse
|
2
1
|
import sys
|
3
2
|
import json
|
4
3
|
|
5
4
|
|
6
|
-
def read_arg(param, is_path=False):
|
5
|
+
def read_arg(param, is_path=False, posix=True):
|
6
|
+
while param.startswith("-"):
|
7
|
+
param = param[1:]
|
7
8
|
args = sys.argv[1:]
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# 如果是路径并且有引号,去掉引号
|
9
|
+
for i in range(len(args)):
|
10
|
+
if args[i] == "-" + param or args[i] == "--" + param:
|
11
|
+
value = args[i + 1]
|
12
|
+
break
|
13
13
|
if is_path and value and value.startswith('"') and value.endswith('"'):
|
14
14
|
value = value[1:-1]
|
15
|
+
if posix:
|
16
|
+
value = value.replace("\\", "/")
|
15
17
|
|
16
18
|
return value
|
17
19
|
|
@@ -20,10 +20,10 @@ pycoze/ui/color.py,sha256=cT9Ib8uNzkOKxyW0IwVj46o4LwdB1xgNCj1_Rou9d_4,854
|
|
20
20
|
pycoze/ui/typ.py,sha256=NpT0FrbHvByOszBZMFtroRp7I7pN-38tYz_zPOPejF4,1723
|
21
21
|
pycoze/ui/ui_def.py,sha256=CNFYH8NC-WYmbceIPpxsRr9H6O006pMKukx7U-BOE1Q,3744
|
22
22
|
pycoze/utils/__init__.py,sha256=KExBkotf23dr2NfTEouWke5nJB1q2IuDXgHrmuyd95k,73
|
23
|
-
pycoze/utils/arg.py,sha256=
|
23
|
+
pycoze/utils/arg.py,sha256=MyD4jOJDY73f44MBKOzNMEAXM2Ai6J9PWARtVlEQQno,736
|
24
24
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
25
|
-
pycoze-0.1.
|
26
|
-
pycoze-0.1.
|
27
|
-
pycoze-0.1.
|
28
|
-
pycoze-0.1.
|
29
|
-
pycoze-0.1.
|
25
|
+
pycoze-0.1.59.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
26
|
+
pycoze-0.1.59.dist-info/METADATA,sha256=xQDBrh8KF7tExzg6c_Or35PPa48GllK7onUlHUvX9tE,719
|
27
|
+
pycoze-0.1.59.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
28
|
+
pycoze-0.1.59.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
29
|
+
pycoze-0.1.59.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|