byzh-core 0.0.2.2__py3-none-any.whl → 0.0.2.3__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
@@ -56,4 +56,5 @@ def rm(path):
56
56
  if os.path.isdir(path):
57
57
  shutil.rmtree(path)
58
58
  if os.path.isfile(path):
59
- os.remove(path)
59
+ os.remove(path)
60
+
@@ -172,7 +172,7 @@ class B_AutoTable:
172
172
  dir = Path(path).resolve().parent
173
173
  os.makedirs(dir, exist_ok=True)
174
174
  with open(path, 'w') as f:
175
- f.write(self.get_table_by_str())
175
+ f.write(self.to_str())
176
176
 
177
177
  def update_txt(self, path):
178
178
  '''
@@ -194,7 +194,7 @@ class B_AutoTable:
194
194
 
195
195
 
196
196
 
197
- def get_table_by_strs(self) -> List[str]:
197
+ def to_strs(self) -> List[str]:
198
198
  transpose = self._need_transpose()
199
199
  self._update_all(transpose)
200
200
  self._update_widths()
@@ -222,9 +222,9 @@ class B_AutoTable:
222
222
 
223
223
  return results
224
224
 
225
- def get_table_by_str(self) -> str:
225
+ def to_str(self) -> str:
226
226
  result = ""
227
- strs = self.get_table_by_strs()
227
+ strs = self.to_strs()
228
228
  for x in strs[:-1]:
229
229
  result += x + '\n'
230
230
  result += strs[-1]
@@ -391,7 +391,7 @@ class B_AutoTable:
391
391
  return True
392
392
  return False
393
393
  def __str__(self):
394
- return self.get_table_by_str()
394
+ return self.to_str()
395
395
 
396
396
  def __getitem__(self, index):
397
397
  index = str(index)
@@ -19,7 +19,7 @@ class B_Tqdm:
19
19
  :param total: 总数
20
20
  :param prefix: 前缀
21
21
  :param suffix: 后缀
22
- :param length: 进度条长度(字符)
22
+ :param length: 进度条长度(字符), 默认为20个字符长度
23
23
  :param fill: 填充字符
24
24
  """
25
25
  super().__init__()
@@ -64,7 +64,7 @@ class B_Tqdm:
64
64
  # 更新进度条
65
65
  if self.total is not None:
66
66
  filled_length = int(self.length * self.current // self.total)
67
- bar = self.fill * filled_length + '-' * (self.length - filled_length)
67
+ bar = self.fill * filled_length + '-' * (self.length - filled_length) * len(self.fill)
68
68
 
69
69
  sys.stdout.write(f'\r{color}{self.prefix} |{bar}|'
70
70
  f' {self.current}/{self.total} -> {elapsed_str}<{estimated_str} | {speed:.1f} it/s |'
byzh_core/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  # class 以"B_"开头
3
3
  # function 以"b_"开头
4
4
 
5
- __version__ = '0.0.2.2'
5
+ __version__ = '0.0.2.3'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: byzh_core
3
- Version: 0.0.2.2
3
+ Version: 0.0.2.3
4
4
  Summary: byzh_core是byzh系列的核心库,包含了一些常用的工具函数和类。
5
5
  Author: byzh_rc
6
6
  License: MIT
@@ -1,5 +1,5 @@
1
- byzh_core/B_os.py,sha256=xqEYTiOKkFCpJhPXGyA5Qjiz9NX7qpMPCTHuN_Z-M7Y,1226
2
- byzh_core/__init__.py,sha256=9kQtKRLFe5bTTI8z2hHUl96YHEP-kb8pfPNT_WoHglk,110
1
+ byzh_core/B_os.py,sha256=p5WdQ5TqSAbZfc1SV2cy5lrhYWwEMZiIjfw8Ivilrfo,1230
2
+ byzh_core/__init__.py,sha256=wHBpl61gLGxouCl5uVOulQUgjCne5E2cxJ_PzyOwqk4,110
3
3
  byzh_core/Barchive/__init__.py,sha256=wUdz646VS0Uhq9lwMkd3YQHCvQhLDqgADoDjFGMqIn0,65
4
4
  byzh_core/Barchive/archive.py,sha256=yIQgef1APUcZdHM_7Pa9rCam-P3PA3pbcSJSaySoUj4,2498
5
5
  byzh_core/Bbasic/__init__.py,sha256=wr7Y7YJINhgpV5X6BT5DaGJKcHUOZYNerCGXoi2Egac,116
@@ -14,7 +14,7 @@ byzh_core/Bos/__init__.py,sha256=mMa6OugZs8gIfZMj7go_wEHZRe0JRffgiyIKTF5I_uc,88
14
14
  byzh_core/Bos/make.py,sha256=uGmHc96lXChihJs2jGiXJRp3tU_U5DPCo8jcc-aW6d4,663
15
15
  byzh_core/Bos/remove.py,sha256=HuGQlEOz7IZB_c6T9MzR3miRx60IeaBYP-3lp-P20-I,156
16
16
  byzh_core/Btable/__init__.py,sha256=wpfHMPD4awPRDJVYlaiGtkkpjq2srWB7d7LrWhoX5R0,161
17
- byzh_core/Btable/auto_table.py,sha256=JREmn6KIlZKkv1Vsc23Ow3fDiJAgfMppbGKDUY8rfyk,14002
17
+ byzh_core/Btable/auto_table.py,sha256=nC9eHj_IIGVkS2lmN_1gtOyglLCaGlwdoHzPvNNQDEw,13952
18
18
  byzh_core/Btable/row_table.py,sha256=rIX0-Yvb3RnO0RJBkA4m18gux1zYSnEKTy6uQGcWilc,5999
19
19
  byzh_core/Btable/xy_table.py,sha256=-KHK8EUlkJj3Rh0sp_KHI0QFt29AlMASMmR8q8ykUBM,6784
20
20
  byzh_core/Btable/obsolete/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -22,12 +22,12 @@ byzh_core/Btable/obsolete/b_auto_table.py,sha256=Cmblv_pknQeMew_KLO8vGdeSRtAykwb
22
22
  byzh_core/Bterminal/__init__.py,sha256=B6p6mHVhi5LAHKlvqfrv20E6XNqUsfU2xD753V6-Zf4,83
23
23
  byzh_core/Bterminal/cmd.py,sha256=iK0fwI0D3peEwUYYZWwnl9X8ImFfrBsEq6ySd3DcRdE,3839
24
24
  byzh_core/Btqdm/__init__.py,sha256=PQRcUn9WXd1YGyFMEKnJU74mdV695_8NHQ56Nsja0DM,53
25
- byzh_core/Btqdm/my_tqdm.py,sha256=3Xrw6qOEidLqKGE2UD3i37_cMzrSWy4QpNpO2_4I88M,2833
25
+ byzh_core/Btqdm/my_tqdm.py,sha256=myyFo3GgyX_wWfSjMWfSTkcnTECf1tqwpXEFpJkzNtw,2878
26
26
  byzh_core/Bwriter/__init__.py,sha256=KSsbCJZ-1j5wOr-ZbTg8K3A8Du73d22DQVLdmq-3CBo,116
27
27
  byzh_core/Bwriter/globalwriter.py,sha256=tSjWxzLylAeZep67n5jbRsjQkXkBKRZLvKXUyGSY92Q,1824
28
28
  byzh_core/Bwriter/writer.py,sha256=px0ZNoSuXS_RbwVnYsBx2lYohyhHACfHM8-HBNEflhU,4006
29
- byzh_core-0.0.2.2.dist-info/LICENSE,sha256=-nRwf0Xga4AX5bsWBXXflpDpgX_U23X06oAMcdf0dSY,1089
30
- byzh_core-0.0.2.2.dist-info/METADATA,sha256=foV-fXyBRcoTlI5x3EVzS5OFMtMmjLeocQZkE0uA23Y,371
31
- byzh_core-0.0.2.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
32
- byzh_core-0.0.2.2.dist-info/top_level.txt,sha256=Xv-pzvl6kPdIbi5UehQcUdGhLtb8-4WhS5dRK1LINwM,10
33
- byzh_core-0.0.2.2.dist-info/RECORD,,
29
+ byzh_core-0.0.2.3.dist-info/LICENSE,sha256=-nRwf0Xga4AX5bsWBXXflpDpgX_U23X06oAMcdf0dSY,1089
30
+ byzh_core-0.0.2.3.dist-info/METADATA,sha256=QHT6cpLBbLOEMeWzsToanRwyXFc9IMsSDbQ02NdKhTQ,371
31
+ byzh_core-0.0.2.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
32
+ byzh_core-0.0.2.3.dist-info/top_level.txt,sha256=Xv-pzvl6kPdIbi5UehQcUdGhLtb8-4WhS5dRK1LINwM,10
33
+ byzh_core-0.0.2.3.dist-info/RECORD,,