byzh-core 0.0.2.3__py3-none-any.whl → 0.0.2.5__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.
byzh_core/B_os.py CHANGED
@@ -58,3 +58,29 @@ def rm(path):
58
58
  if os.path.isfile(path):
59
59
  os.remove(path)
60
60
 
61
+ def get_dirpaths_in_dir(root_dir_path, unwanted_dirname=['__pycache__']):
62
+ result = []
63
+ for root, dirs, files in os.walk(root_dir_path):
64
+ path = Path(root)
65
+ if path.name in unwanted_dirname:
66
+ continue
67
+ result.append(path)
68
+
69
+ result = result[1:]
70
+
71
+ return result
72
+
73
+ def get_filepaths_in_dir(root_dir_path, unwanted_name=[], unwanted_suffix=['.pyc']):
74
+ file_paths = []
75
+ for root, dirs, files in os.walk(root_dir_path):
76
+ for file in files:
77
+ file_path = os.path.join(root, file)
78
+ file_path = Path(file_path)
79
+ if file_path.name in unwanted_name or file_path.suffix in unwanted_suffix:
80
+ continue
81
+ file_paths.append(file_path)
82
+ return file_paths
83
+
84
+ if __name__ == '__main__':
85
+ print(get_dirpaths_in_dir(r'E:\byzh_workingplace\byzh-rc-to-pypi\uploadToPypi_core\byzh_core'))
86
+ print(get_filepaths_in_dir(r'E:\byzh_workingplace\byzh-rc-to-pypi\uploadToPypi_core\byzh_core'))
@@ -1,6 +1,4 @@
1
- from .row_table import B_RowTable
2
- from .xy_table import B_XYTable
3
- from .auto_table import B_AutoTable
1
+ from .auto_table import B_Table2d
4
2
 
5
3
 
6
- __all__ = ['B_RowTable', 'B_XYTable', 'B_AutoTable']
4
+ __all__ = ['B_Table2d']