byzh-core 0.0.2.9__tar.gz → 0.0.2.11__tar.gz

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.
Files changed (34) hide show
  1. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/PKG-INFO +1 -1
  2. byzh_core-0.0.2.11/byzh_core/Bwriter/__init__.py +5 -0
  3. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bwriter/writer.py +7 -4
  4. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/__init__.py +1 -1
  5. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core.egg-info/PKG-INFO +1 -1
  6. byzh_core-0.0.2.9/byzh_core/Bwriter/__init__.py +0 -3
  7. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/LICENSE +0 -0
  8. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/README.md +0 -0
  9. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/B_os.py +0 -0
  10. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Barchive/__init__.py +0 -0
  11. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Barchive/archive.py +0 -0
  12. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bbasic/__init__.py +0 -0
  13. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bbasic/text_style.py +0 -0
  14. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bmath/__init__.py +0 -0
  15. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bmath/divides.py +0 -0
  16. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bmath/get_norm.py +0 -0
  17. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Btable/__init__.py +0 -0
  18. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Btable/auto_table.py +0 -0
  19. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bterminal/__init__.py +0 -0
  20. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Bterminal/cmd.py +0 -0
  21. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Btqdm/__init__.py +0 -0
  22. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/Btqdm/my_tqdm.py +0 -0
  23. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/Bconfig/__init__.py +0 -0
  24. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/Bconfig/config.py +0 -0
  25. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/__init__.py +0 -0
  26. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/auto_table.py +0 -0
  27. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/row_table.py +0 -0
  28. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core/obsolete/xy_table.py +0 -0
  29. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core.egg-info/SOURCES.txt +0 -0
  30. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core.egg-info/dependency_links.txt +0 -0
  31. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core.egg-info/requires.txt +0 -0
  32. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/byzh_core.egg-info/top_level.txt +0 -0
  33. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/setup.cfg +0 -0
  34. {byzh_core-0.0.2.9 → byzh_core-0.0.2.11}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: byzh_core
3
- Version: 0.0.2.9
3
+ Version: 0.0.2.11
4
4
  Summary: byzh_core是byzh系列的核心库,包含了一些常用的工具函数和类。
5
5
  Author: byzh_rc
6
6
  License: MIT
@@ -0,0 +1,5 @@
1
+ from .writer import B_Writer, B_Color
2
+
3
+ __all__ = [ 'B_Color',
4
+ 'B_Writer'
5
+ ]
@@ -5,6 +5,9 @@ import os
5
5
 
6
6
  from ..Bbasic import B_Color
7
7
 
8
+ def color_wrap(string:str, color:B_Color):
9
+ return color.value + string + B_Color.RESET.value
10
+
8
11
  class B_Writer:
9
12
  def __init__(
10
13
  self,
@@ -22,7 +25,7 @@ class B_Writer:
22
25
  self.mode = mode
23
26
  self.time_file = time_file
24
27
 
25
- self.color = color.value
28
+ self.color = color
26
29
 
27
30
  self.f = None
28
31
  self.setFile(self.path, self.mode, self.time_file)
@@ -66,9 +69,9 @@ class B_Writer:
66
69
  t = time.strftime("%Y-%m-%d %H:%M:%S ##### ", time.localtime())
67
70
 
68
71
  if color is None:
69
- print(self.color + t + str(string) + B_Color.RESET.value)
72
+ print(color_wrap(t+str(string), self.color))
70
73
  else:
71
- print(color.value + t + str(string) + B_Color.RESET.value)
74
+ print(color_wrap(t+str(string), color))
72
75
 
73
76
  def toFile(self, string:str, ifTime:bool=None):
74
77
  '''
@@ -82,7 +85,7 @@ class B_Writer:
82
85
  elif ifTime==True or self.time_file==True:
83
86
  t = time.strftime("%Y-%m-%d %H:%M:%S ##### ", time.localtime())
84
87
 
85
- self.f.write(str(string+t))
88
+ self.f.write(str(t+string))
86
89
  self.f.write("\n")
87
90
  self.f.flush()
88
91
 
@@ -2,4 +2,4 @@
2
2
  # class 以"B_"开头
3
3
  # function 以"b_"开头
4
4
 
5
- __version__ = '0.0.2.9'
5
+ __version__ = '0.0.2.11'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: byzh_core
3
- Version: 0.0.2.9
3
+ Version: 0.0.2.11
4
4
  Summary: byzh_core是byzh系列的核心库,包含了一些常用的工具函数和类。
5
5
  Author: byzh_rc
6
6
  License: MIT
@@ -1,3 +0,0 @@
1
- from .writer import B_Writer
2
-
3
- __all__ = ['B_Writer']
File without changes
File without changes
File without changes
File without changes