0.1.17
This commit is contained in:
parent
2a34e0264a
commit
fee268a17f
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.1.16
|
version = 0.1.17
|
||||||
author = guanjihuan
|
author = guanjihuan
|
||||||
author_email = guanjihuan@163.com
|
author_email = guanjihuan@163.com
|
||||||
description = An open source python package
|
description = An open source python package
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: guan
|
Name: guan
|
||||||
Version: 0.1.16
|
Version: 0.1.17
|
||||||
Summary: An open source python package
|
Summary: An open source python package
|
||||||
Home-page: https://py.guanjihuan.com
|
Home-page: https://py.guanjihuan.com
|
||||||
Author: guanjihuan
|
Author: guanjihuan
|
||||||
|
@ -308,7 +308,7 @@ def find_repeated_file_with_same_filename(directory='./', ignored_directory_with
|
|||||||
return repeated_file
|
return repeated_file
|
||||||
|
|
||||||
# 统计各个子文件夹中的文件数量
|
# 统计各个子文件夹中的文件数量
|
||||||
def count_file_in_sub_directory(directory='./', smaller_than_num=None, sort=0):
|
def count_file_in_sub_directory(directory='./', smaller_than_num=None, sort=0, print_show=1):
|
||||||
import os
|
import os
|
||||||
import numpy as np
|
import numpy as np
|
||||||
dirs_list = []
|
dirs_list = []
|
||||||
@ -325,6 +325,7 @@ def count_file_in_sub_directory(directory='./', smaller_than_num=None, sort=0):
|
|||||||
count_file = len(file_list)
|
count_file = len(file_list)
|
||||||
count_file_array.append(count_file)
|
count_file_array.append(count_file)
|
||||||
if sort == 0:
|
if sort == 0:
|
||||||
|
if print_show == 1:
|
||||||
if smaller_than_num == None:
|
if smaller_than_num == None:
|
||||||
print(sub_dir)
|
print(sub_dir)
|
||||||
print(count_file)
|
print(count_file)
|
||||||
@ -335,6 +336,7 @@ def count_file_in_sub_directory(directory='./', smaller_than_num=None, sort=0):
|
|||||||
print(count_file)
|
print(count_file)
|
||||||
print()
|
print()
|
||||||
if sort == 1:
|
if sort == 1:
|
||||||
|
if print_show == 1:
|
||||||
index_array = np.argsort(count_file_array)
|
index_array = np.argsort(count_file_array)
|
||||||
if smaller_than_num == None:
|
if smaller_than_num == None:
|
||||||
for i0 in index_array:
|
for i0 in index_array:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user