xlin 0.1.14__py2.py3-none-any.whl → 0.1.15__py2.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.
xlin/util.py
CHANGED
@@ -103,32 +103,12 @@ def rm(dir_path: Union[str, Path, List[str], List[Path]], filter: Callable[[Path
|
|
103
103
|
filenames = os.listdir(dir_path)
|
104
104
|
for filename in sorted(filenames):
|
105
105
|
filepath = dir_path / filename
|
106
|
-
|
107
|
-
|
108
|
-
if
|
109
|
-
|
110
|
-
if
|
111
|
-
|
112
|
-
child = filepath
|
113
|
-
while child.exists() and len(os.listdir(child)) > 0:
|
114
|
-
child = child / os.listdir(child)[0]
|
115
|
-
while child != filepath:
|
116
|
-
if child.exists() and len(os.listdir(child)) == 0:
|
117
|
-
child.rmdir()
|
118
|
-
if debug:
|
119
|
-
print(f"删除空文件夹 {child}")
|
120
|
-
else:
|
121
|
-
break
|
122
|
-
if filepath.exists() and len(os.listdir(filepath)) == 0:
|
123
|
-
filepath.rmdir()
|
124
|
-
if debug:
|
125
|
-
print(f"删除空文件夹 {filepath}")
|
126
|
-
elif filter(filepath):
|
127
|
-
rm(filepath, filter, expand_all_subdir)
|
128
|
-
if dir_path.exists() and len(os.listdir(dir_path)) == 0:
|
129
|
-
dir_path.rmdir()
|
130
|
-
if debug:
|
131
|
-
print(f"删除空文件夹 {dir_path}")
|
106
|
+
rm(filepath, filter, expand_all_subdir, debug)
|
107
|
+
if dir_path.exists() and dir_path.is_dir() and len(os.listdir(dir_path)) == 0:
|
108
|
+
if filter(dir_path):
|
109
|
+
dir_path.rmdir()
|
110
|
+
if debug:
|
111
|
+
print(f"删除空文件夹 {dir_path}")
|
132
112
|
|
133
113
|
|
134
114
|
def cp(
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.1
|
2
2
|
Name: xlin
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.15
|
4
4
|
Summary: toolbox for LinXueyuan
|
5
5
|
License: MIT
|
6
6
|
Author: XiChen
|
@@ -18,7 +18,6 @@ Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
-
Classifier: Programming Language :: Python :: 3.13
|
22
21
|
Requires-Dist: loguru
|
23
22
|
Requires-Dist: pandas
|
24
23
|
Requires-Dist: pyexcel
|
@@ -5,10 +5,10 @@ xlin/metric.py,sha256=N7wJ35y-C-IaBr1I1CJ_37lTG7gA69zmn9Xg6xSwKoI,1690
|
|
5
5
|
xlin/multiprocess_mapping.py,sha256=pmzyEUYpbpIZ_ezyvWWWRpr7D7n4t3E3jW1nGXBbVck,7652
|
6
6
|
xlin/read_as_dataframe.py,sha256=P8bOYW-zm8uGhehCldZI9ZQhHHLGqDPDbSMNWI2li6g,8885
|
7
7
|
xlin/statistic.py,sha256=kp2P-Hr5Kb-R3dNgUXQieG8--iitjidg7SJuSiCpKdM,4131
|
8
|
-
xlin/util.py,sha256=
|
8
|
+
xlin/util.py,sha256=RJHMBKC1xVwso3NfYXxIY3qqAfahzDDgzuU7jvNhQBA,10494
|
9
9
|
xlin/xls2xlsx.py,sha256=5zfcM0gmunFQOcOj9nYd9Dj0HMhU7-cPKnPIy6Ot9iU,930
|
10
10
|
xlin/yaml.py,sha256=kICi7G3Td5q2MaSXXt85qNTWoHMgjzt7pvn7r3C4dME,183
|
11
|
-
xlin-0.1.
|
12
|
-
xlin-0.1.
|
13
|
-
xlin-0.1.
|
14
|
-
xlin-0.1.
|
11
|
+
xlin-0.1.15.dist-info/LICENSE,sha256=KX0dDCYlO4DskqMZY8qeY94EZMrDRNnNqlGLkXVlKyM,1063
|
12
|
+
xlin-0.1.15.dist-info/METADATA,sha256=GI2Hz1o2lX6rOSEm12phfhejUx1jG3yC29tkLUen6IA,1089
|
13
|
+
xlin-0.1.15.dist-info/WHEEL,sha256=IrRNNNJ-uuL1ggO5qMvT1GGhQVdQU54d6ZpYqEZfEWo,92
|
14
|
+
xlin-0.1.15.dist-info/RECORD,,
|
File without changes
|