Name | DToolslib JSON |
Version |
2.4.13
JSON |
| download |
home_page | None |
Summary | A simple and miscellaneous utility library containing multiple utility scripts. 一个简单且杂的工具库, 包含多个工具脚本 |
upload_time | 2025-07-23 14:53:42 |
maintainer | None |
docs_url | None |
author | Jf-JIN |
requires_python | >=3.11 |
license | MIT License
Copyright (c) 2025 Jf-JIN
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
signal
logger
logging
enum
timer
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DToolslib
A simple and miscellaneous utility library containing multiple utility scripts.
一个简单且杂的工具库, 包含多个工具脚本
### StaticEnum
An enumeration library, supported
一个枚举类库, 支持:
- Unique variables (not repetitively named)
唯一变量(不可重复命名)
- Value cannot be modified
值不可修改
- Custom properties
自定义属性
- Keep the original type (except None, Boolean), you can use `isinstance` to judge
保留原类型(None, Boolean 除外), 可以使用 `isinstance` 判断
- It can be read directly, and there is no need to use its `value` property. Of course, it can also use `value`
可以直接读取, 不需要使用其 `value` 属性, 当然也可以使用 `value`
- For members of type int, if no value is specified, a unique value will be assigned automatically, starting from 0 and incrementing, avoiding conflicts with existing values in the library.
对于Int 类型, 如果没有指定值, 则自动赋值, 从 0 开始, 依次递增, 且不会与库中其他枚举值重复
###### How to use | 使用方法
```python
class TestEnum(StaticEnum, enable_member_attribute=True):
A = '#ff0000'
A.color_name = 'Red'
A.ansi_font = 31
A.ansi_background = 41
B: int
C: int
D = None
class TestEnum2(StaticEnum):
a = 1
b = 3
AA = '#ff00ff'
BB: int
CC: int
class TestEnum3:
AAA = '#00ff00'
BBB: int
print(TestEnum.A) # output: #ff0000
print(TestEnum.A.name) # output: A
print(TestEnum.A.color_name) # output: Red
print(TestEnum.A.ansi_font) # output: 31
print(type(TestEnum.A)) # output: <class '__main__._SEString'>
print(type(TestEnum.TestEnum2.AA)) # output: <class 'str'>
print(isinstance(TestEnum.A, str)) # output: True
print('#ff0000' in TestEnum) # output: True
print(TestEnum.B, TestEnum.C) # output: 0 1
print(TestEnum.TestEnum2.BB, TestEnum.TestEnum2.CC, TestEnum.TestEnum3.BBB) # output: 0 2 0
```
### EventSignal
Imitating the mechanism of Qt's signal and slot, custom signals, this signal can be used out of the Qt framework. There is currently no thread locking and asynchronous mechanism, which supports:
模仿于 Qt 的信号和槽的机制, 自定义的信号, 该信号可以脱离 Qt 框架使用, 目前没有线程锁和异步的机制, 支持:
- Instance signal (default)
实例信号(默认)
- Class signals
类信号
- Attribute protection, the signal cannot be assigned
属性保护, 信号不可被赋值
###### How to use | 使用方法
```python
class Test:
signal_instance_a = EventSignal(str) # Instance Signal
signal_instance_b = EventSignal(str, int) # Instance Signal
signal_class = EventSignal(str, int, signal_scope='class') # Class Signal
a = Test()
b = Test()
b.signal_instance_a.connect(print)
a.signal_instance_b.connect(b.signal_instance_a)
b.signal_instance_a.emit('This is a test message')
a.signal_instance_a.disconnect(b.signal_instance_a)
# output: This is a test message
print(a.signal_class is b.signal_class) # output: True
print(a.signal_instance_a is b.signal_instance_a) # output: False
print(type(a.signal_class)) # output: <class '__main__.EventSignal'>
print(a.__signals__) # output: {...} a dict with 2 keys, the values are signal instances. You can also see the slots of the signal.
print(a.__class_signals__) # output: {...} a dict with 1 keys, the values are signal instances. You can also see the slots of the signal.
```
### Logger
Logger, see docstring for details, support:
日志器, 详见 docstring, 支持:
- Clean old logs before startup to define the total number of retained
启动前清理旧日志, 可定义保留总数
- Size splitting
大小分割
- Days segmentation
天数分割
- Function traceability exclusion, class traceability exclusion, module traceability exclusion, for example: Exclude func1 function under ClassA class (assuming the relationship chain is: ClassA->func3->func2->func1), then log positioning will be located to func2
函数追溯排除, 类追溯排除, 模块追溯排除, 例如: 排除 `ClassA` 类下的 `func1` 函数(假设关系链为: `ClassA->func3->func2->func1` ), 则日志定位将定位到`func2`
- Output highlight styles and terminal color styles. After setting, you can obtain HTML style information through the signal.
输出高亮样式, 终端彩色样式. 设置后, 可以通过信号获取 HTML 样式的信息
- Can track logging output
可跟踪 logging 输出
- Can be output with a signal
可通过信号针对性输出
###### How to use | 使用方法
```python
Log = Logger('test', os.path.dirname(__file__), log_level='info')
Log.signal_debug_message.connect(print)
logging.debug('hello world from logging debug') # logging tracking example
Log.trace('This is a trace message.')
Log.debug('This is a debug message.')
Log.info('This is a info message.')
Log.warning('This is a warning message.')
Log.error('This is a error message.')
Log.critical('This is a critical message.')
```
### LoggerGroup
Logger group, see docstring for details, support
日志器组, 详见 docstring, 支持
- Size splitting
大小分割
- Days segmentation
天数分割
- All Logger information is automatically collected by default, and it can also be manually changed to specify a few Loggers.
默认自动收集所有 Logger 信息, 也可以手动更改为指定某几个 Logger
- Output highlight style, same Logger
输出高亮样式, 同 Logger
- Can be output with a signal
可通过信号针对性输出
- Singleton mode
单例模式
###### How to use | 使用方法
```python
Log = Logger('test', os.path.dirname(__file__), log_level='info')
Log_1 = Logger('tests', os.path.dirname(__file__), log_sub_folder_name='test_folder', log_level='trace')
Logger_group = LoggerGroup(os.path.dirname(__file__))
Log.info('This is a info message.')
Log_1.warning('This is a warning message.')
Log.error('This is a error message.')
Log_1.critical('This is a critical message.')
```
### Inner_Decorators
Interior Decorators
内部装饰器
- `try_except_log`: Capture errors and output them to logs. The function needs to be improved and is not recommended
捕捉报错并输出给日志, 功能有待完善, 不推荐使用
- `boundary_check`: Function/method boundary check, not tested
函数/方法边界检查, 未测试
- `time_counter`: Calculate the function/method run time and print it
计算函数/方法运行时间, 并打印
- `who_called_me`: Get the call tree
获取调用树
# 版本信息 Version Info
#### v1.0.0.0
* Refactored the StaticEnum class and added setting function
重构了 StaticEnum 类, 增加了设置功能
* The class names Logger and LoggerGroup are deprecated and have been replaced with JFLogger and JFLoggerGroup, respectively.
弃用了 Logger 和 LoggerGroup 类名, 改为 JFLogger 和 JFLoggerGroup
#### v0.0.2.3
* 增加信号的线程安全, 完善Logger的函数, 并更名为JFLogger, 以区分于logging的Logger, 修改注释为英文
#### v0.0.2.1
* 增加信号的异步执行, 但无线程锁, 不保证线程安全
#### v0.0.1.7
* Added support for Python 3.8
增加对Python 3.8的支持
#### v0.0.1.6
* Fixed the bug where the Logger would crash when writing to a file if the folder/file did not exist.
修复Logger写入文件时, 文件夹/文件不存在时崩溃的Bug
* Fixed the bug where the Logger would crash when sys.stdout was optimized to None.
修复Logger中sys.stdout被优化时为None而导致崩溃的bug
* Fixed the bug where LoggerGroup would automatically create a folder during initialization even if no file output was specified.
修复LoggerGroup中初始化时即使不输出文件但仍会自动建立文件夹的bug
* Added name and folder_path attributes to the Logger.
增加Logger的name和folder_path属性
* Try to fix the issue where the Logger did not automatically remove its own data from class attributes when it is destroyed.
尝试修复Logger被删除时未能自动删除类属性中的自身数据
#### v0.0.1.5
* Fixed the error message of EventSignal signal class
修正 EventSignal 信号类的报错信息
* Fixed the issue where numerical values and in-class flags were mixed in iter of StaticEnum
修复StaticEnum中数值和类内标志混合在iter中的问题
* Fixed a bug where disconnecting an EventSignal signal failed when the slot was another signal
修改 EventSignal 信号断开连接时, slot 为信号时无法断开的 bug
* Modified the actual connection signal class name in EventSignal
修改 EventSignal 实际连接信号类名
* Added the display of the number of slot functions when printing EventSignal signals. It will be easier to debug
增加打印EventSignal 信号时对槽函数数量的显示, 便于调试
* Modified the highlight enumeration class LogHighlightType to public access
更改高亮枚举类 LogHighlightType 为公共访问
* Added a check in Logger and LoggerGroup to verify whether the log folder exists before writing to a file, preventing errors when the log folder is deleted during runtime
增加 Logger 和 LoggerGroup 写入文件前对文件夹是否存在进行检查, 保证运行时日志文件夹被删除时不会发生报错
* Added an exclusion setting in LoggerGroup to prevent listening to certain loggers
增加 LoggerGroup 排除对某些日志器监听的设置
* Added the remove_listen_logging method to Logger
新增 Logger 的 remove_listen_logging 方法
* Added the \_\_repr__ method to Logger
增加 Logger 的 \_\_repr__方法
* Fixed incorrect line breaks when the highlighting type is set to HTML
修复高亮类型为 HTML 时, 换行符不对的 bug
* Fixed list and connection errors when adding or removing logger listeners in LoggerGroup
修复 LoggerGroup 增加日志器监听和移除监听时, 列表和连接的错误
* Fixed a logic bug in LoggerGroup's remove_log method
修复 LoggerGroup 的 remove_log 逻辑 bug
* Fixed an issue where Logger was not removed from the logger list upon destruction
修改 Logger 销毁时没有移除Logger列表中的自身元素
* Removed the singleton mode of listeners in Logger
取消 Logger 中监听器的单例模式
* Refactored Logger and LoggerGroup parameters to follow the Qt-style approach. Some initialization parameters are retained, while others must be explicitly set via method calls
对 Logger 和 LoggerGroup 参数传入参考qt风格进行重构, 保留部分初始化参数, 其余参数需显示调用方法进行设置
* Separated Logger's logging listener. If logging needs to be listened to, the method must be explicitly called to enable it
分离 Logger 对 logging 的监听, 如需监听则需显示调用方法进行设置
#### v0.0.1.4
* The new logger supports the exclusion of combined function names (such as `ClassA.func1`). Currently, only first-level combinations are supported, that is, the most recent class to which the method belongs must be consistent with the current class at the time of call.
新增日志器支持对组合函数名(如 `ClassA.func1`)的排除. 目前仅支持一级组合, 即方法所属的最近一级类必须与调用时的当前类一致.
* Fixed the issue that StaticEnum could add new properties outside, as well as the bug in data type errors in multi-layer nested classes inside.
修复 StaticEnum 可在外部新增属性的问题, 以及内部多层嵌套类的数据类型错误的 bug.
* Modified the way data types are converted in the StaticEnum metaclass, changed from the previous eval to created with the class.
更改了 StaticEnum 元类中转换数据类型的方式, 从之前的eval更改为用类创建.
Raw data
{
"_id": null,
"home_page": null,
"name": "DToolslib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "signal, logger, logging, enum, timer",
"author": "Jf-JIN",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9e/d0/2d43cb37c4cc66ee996398b6c7aab908baa71e82e69b19a36aecf8bdd0dd/dtoolslib-2.4.13.tar.gz",
"platform": null,
"description": "# DToolslib\n\nA simple and miscellaneous utility library containing multiple utility scripts.\n\u4e00\u4e2a\u7b80\u5355\u4e14\u6742\u7684\u5de5\u5177\u5e93, \u5305\u542b\u591a\u4e2a\u5de5\u5177\u811a\u672c\n\n### StaticEnum\n\nAn enumeration library, supported\n\u4e00\u4e2a\u679a\u4e3e\u7c7b\u5e93, \u652f\u6301:\n\n- Unique variables (not repetitively named)\n \u552f\u4e00\u53d8\u91cf(\u4e0d\u53ef\u91cd\u590d\u547d\u540d)\n- Value cannot be modified\n \u503c\u4e0d\u53ef\u4fee\u6539\n- Custom properties\n \u81ea\u5b9a\u4e49\u5c5e\u6027\n- Keep the original type (except None, Boolean), you can use `isinstance` to judge\n \u4fdd\u7559\u539f\u7c7b\u578b(None, Boolean \u9664\u5916), \u53ef\u4ee5\u4f7f\u7528 `isinstance` \u5224\u65ad\n- It can be read directly, and there is no need to use its `value` property. Of course, it can also use `value`\n \u53ef\u4ee5\u76f4\u63a5\u8bfb\u53d6, \u4e0d\u9700\u8981\u4f7f\u7528\u5176 `value` \u5c5e\u6027, \u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528 `value`\n- For members of type int, if no value is specified, a unique value will be assigned automatically, starting from 0 and incrementing, avoiding conflicts with existing values in the library.\n \u5bf9\u4e8eInt \u7c7b\u578b, \u5982\u679c\u6ca1\u6709\u6307\u5b9a\u503c, \u5219\u81ea\u52a8\u8d4b\u503c, \u4ece 0 \u5f00\u59cb, \u4f9d\u6b21\u9012\u589e, \u4e14\u4e0d\u4f1a\u4e0e\u5e93\u4e2d\u5176\u4ed6\u679a\u4e3e\u503c\u91cd\u590d\n\n###### How to use | \u4f7f\u7528\u65b9\u6cd5\n\n```python\nclass TestEnum(StaticEnum, enable_member_attribute=True):\n A = '#ff0000'\n A.color_name = 'Red'\n A.ansi_font = 31\n A.ansi_background = 41\n B: int\n C: int\n D = None\n\n class TestEnum2(StaticEnum):\n a = 1\n b = 3\n AA = '#ff00ff'\n BB: int\n CC: int\n\n class TestEnum3:\n AAA = '#00ff00'\n BBB: int\n\nprint(TestEnum.A) # output: #ff0000\nprint(TestEnum.A.name) # output: A\nprint(TestEnum.A.color_name) # output: Red\nprint(TestEnum.A.ansi_font) # output: 31\nprint(type(TestEnum.A)) # output: <class '__main__._SEString'>\nprint(type(TestEnum.TestEnum2.AA)) # output: <class 'str'>\nprint(isinstance(TestEnum.A, str)) # output: True\nprint('#ff0000' in TestEnum) # output: True\nprint(TestEnum.B, TestEnum.C) # output: 0 1\nprint(TestEnum.TestEnum2.BB, TestEnum.TestEnum2.CC, TestEnum.TestEnum3.BBB) # output: 0 2 0\n```\n\n### EventSignal\n\nImitating the mechanism of Qt's signal and slot, custom signals, this signal can be used out of the Qt framework. There is currently no thread locking and asynchronous mechanism, which supports:\n\u6a21\u4eff\u4e8e Qt \u7684\u4fe1\u53f7\u548c\u69fd\u7684\u673a\u5236, \u81ea\u5b9a\u4e49\u7684\u4fe1\u53f7, \u8be5\u4fe1\u53f7\u53ef\u4ee5\u8131\u79bb Qt \u6846\u67b6\u4f7f\u7528, \u76ee\u524d\u6ca1\u6709\u7ebf\u7a0b\u9501\u548c\u5f02\u6b65\u7684\u673a\u5236, \u652f\u6301:\n\n- Instance signal (default) \n \u5b9e\u4f8b\u4fe1\u53f7(\u9ed8\u8ba4)\n- Class signals\n \u7c7b\u4fe1\u53f7\n- Attribute protection, the signal cannot be assigned\n \u5c5e\u6027\u4fdd\u62a4, \u4fe1\u53f7\u4e0d\u53ef\u88ab\u8d4b\u503c\n\n###### How to use | \u4f7f\u7528\u65b9\u6cd5\n\n```python\nclass Test:\n signal_instance_a = EventSignal(str) # Instance Signal\n signal_instance_b = EventSignal(str, int) # Instance Signal\n signal_class = EventSignal(str, int, signal_scope='class') # Class Signal\na = Test()\nb = Test()\nb.signal_instance_a.connect(print)\na.signal_instance_b.connect(b.signal_instance_a)\nb.signal_instance_a.emit('This is a test message')\na.signal_instance_a.disconnect(b.signal_instance_a)\n# output: This is a test message\nprint(a.signal_class is b.signal_class) # output: True\nprint(a.signal_instance_a is b.signal_instance_a) # output: False\nprint(type(a.signal_class)) # output: <class '__main__.EventSignal'>\nprint(a.__signals__) # output: {...} a dict with 2 keys, the values are signal instances. You can also see the slots of the signal.\nprint(a.__class_signals__) # output: {...} a dict with 1 keys, the values are signal instances. You can also see the slots of the signal.\n```\n\n### Logger\n\nLogger, see docstring for details, support:\n\u65e5\u5fd7\u5668, \u8be6\u89c1 docstring, \u652f\u6301:\n\n- Clean old logs before startup to define the total number of retained\n \u542f\u52a8\u524d\u6e05\u7406\u65e7\u65e5\u5fd7, \u53ef\u5b9a\u4e49\u4fdd\u7559\u603b\u6570\n \n- Size splitting\n \u5927\u5c0f\u5206\u5272\n \n- Days segmentation\n \u5929\u6570\u5206\u5272\n \n- Function traceability exclusion, class traceability exclusion, module traceability exclusion, for example: Exclude func1 function under ClassA class (assuming the relationship chain is: ClassA->func3->func2->func1), then log positioning will be located to func2\n \n \n \n \u51fd\u6570\u8ffd\u6eaf\u6392\u9664, \u7c7b\u8ffd\u6eaf\u6392\u9664, \u6a21\u5757\u8ffd\u6eaf\u6392\u9664, \u4f8b\u5982: \u6392\u9664 `ClassA` \u7c7b\u4e0b\u7684 `func1` \u51fd\u6570(\u5047\u8bbe\u5173\u7cfb\u94fe\u4e3a: `ClassA->func3->func2->func1` ), \u5219\u65e5\u5fd7\u5b9a\u4f4d\u5c06\u5b9a\u4f4d\u5230`func2`\n \n- Output highlight styles and terminal color styles. After setting, you can obtain HTML style information through the signal.\n \u8f93\u51fa\u9ad8\u4eae\u6837\u5f0f, \u7ec8\u7aef\u5f69\u8272\u6837\u5f0f. \u8bbe\u7f6e\u540e, \u53ef\u4ee5\u901a\u8fc7\u4fe1\u53f7\u83b7\u53d6 HTML \u6837\u5f0f\u7684\u4fe1\u606f\n \n- Can track logging output\n \u53ef\u8ddf\u8e2a logging \u8f93\u51fa\n \n- Can be output with a signal\n \u53ef\u901a\u8fc7\u4fe1\u53f7\u9488\u5bf9\u6027\u8f93\u51fa\n\n###### How to use | \u4f7f\u7528\u65b9\u6cd5\n\n```python\nLog = Logger('test', os.path.dirname(__file__), log_level='info')\nLog.signal_debug_message.connect(print)\nlogging.debug('hello world from logging debug') # logging tracking example\nLog.trace('This is a trace message.')\nLog.debug('This is a debug message.')\nLog.info('This is a info message.')\nLog.warning('This is a warning message.')\nLog.error('This is a error message.')\nLog.critical('This is a critical message.')\n```\n\n### LoggerGroup\n\nLogger group, see docstring for details, support\n\u65e5\u5fd7\u5668\u7ec4, \u8be6\u89c1 docstring, \u652f\u6301\n\n- Size splitting\n \u5927\u5c0f\u5206\u5272\n- Days segmentation\n \u5929\u6570\u5206\u5272\n- All Logger information is automatically collected by default, and it can also be manually changed to specify a few Loggers.\n \u9ed8\u8ba4\u81ea\u52a8\u6536\u96c6\u6240\u6709 Logger \u4fe1\u606f, \u4e5f\u53ef\u4ee5\u624b\u52a8\u66f4\u6539\u4e3a\u6307\u5b9a\u67d0\u51e0\u4e2a Logger\n- Output highlight style, same Logger\n \u8f93\u51fa\u9ad8\u4eae\u6837\u5f0f, \u540c Logger\n- Can be output with a signal\n \u53ef\u901a\u8fc7\u4fe1\u53f7\u9488\u5bf9\u6027\u8f93\u51fa\n- Singleton mode\n \u5355\u4f8b\u6a21\u5f0f\n\n###### How to use | \u4f7f\u7528\u65b9\u6cd5\n\n```python\nLog = Logger('test', os.path.dirname(__file__), log_level='info')\nLog_1 = Logger('tests', os.path.dirname(__file__), log_sub_folder_name='test_folder', log_level='trace')\nLogger_group = LoggerGroup(os.path.dirname(__file__))\nLog.info('This is a info message.')\nLog_1.warning('This is a warning message.')\nLog.error('This is a error message.')\nLog_1.critical('This is a critical message.')\n```\n\n### Inner_Decorators\n\nInterior Decorators\n\u5185\u90e8\u88c5\u9970\u5668\n\n- `try_except_log`: Capture errors and output them to logs. The function needs to be improved and is not recommended\n \u6355\u6349\u62a5\u9519\u5e76\u8f93\u51fa\u7ed9\u65e5\u5fd7, \u529f\u80fd\u6709\u5f85\u5b8c\u5584, \u4e0d\u63a8\u8350\u4f7f\u7528\n- `boundary_check`: Function/method boundary check, not tested\n \u51fd\u6570/\u65b9\u6cd5\u8fb9\u754c\u68c0\u67e5, \u672a\u6d4b\u8bd5\n- `time_counter`: Calculate the function/method run time and print it\n \u8ba1\u7b97\u51fd\u6570/\u65b9\u6cd5\u8fd0\u884c\u65f6\u95f4, \u5e76\u6253\u5370\n- `who_called_me`: Get the call tree\n \u83b7\u53d6\u8c03\u7528\u6811\n\n# \u7248\u672c\u4fe1\u606f Version Info\n#### v1.0.0.0\n* Refactored the StaticEnum class and added setting function\n \u91cd\u6784\u4e86 StaticEnum \u7c7b, \u589e\u52a0\u4e86\u8bbe\u7f6e\u529f\u80fd\n* The class names Logger and LoggerGroup are deprecated and have been replaced with JFLogger and JFLoggerGroup, respectively.\n \u5f03\u7528\u4e86 Logger \u548c LoggerGroup \u7c7b\u540d, \u6539\u4e3a JFLogger \u548c JFLoggerGroup\n\n#### v0.0.2.3\n* \u589e\u52a0\u4fe1\u53f7\u7684\u7ebf\u7a0b\u5b89\u5168, \u5b8c\u5584Logger\u7684\u51fd\u6570, \u5e76\u66f4\u540d\u4e3aJFLogger, \u4ee5\u533a\u5206\u4e8elogging\u7684Logger, \u4fee\u6539\u6ce8\u91ca\u4e3a\u82f1\u6587\n#### v0.0.2.1\n* \u589e\u52a0\u4fe1\u53f7\u7684\u5f02\u6b65\u6267\u884c, \u4f46\u65e0\u7ebf\u7a0b\u9501, \u4e0d\u4fdd\u8bc1\u7ebf\u7a0b\u5b89\u5168\n\n#### v0.0.1.7\n\n* Added support for Python 3.8\n \u589e\u52a0\u5bf9Python 3.8\u7684\u652f\u6301\n\n#### v0.0.1.6\n\n* Fixed the bug where the Logger would crash when writing to a file if the folder/file did not exist.\n \u4fee\u590dLogger\u5199\u5165\u6587\u4ef6\u65f6, \u6587\u4ef6\u5939/\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u5d29\u6e83\u7684Bug\n* Fixed the bug where the Logger would crash when sys.stdout was optimized to None.\n \u4fee\u590dLogger\u4e2dsys.stdout\u88ab\u4f18\u5316\u65f6\u4e3aNone\u800c\u5bfc\u81f4\u5d29\u6e83\u7684bug\n* Fixed the bug where LoggerGroup would automatically create a folder during initialization even if no file output was specified.\n \u4fee\u590dLoggerGroup\u4e2d\u521d\u59cb\u5316\u65f6\u5373\u4f7f\u4e0d\u8f93\u51fa\u6587\u4ef6\u4f46\u4ecd\u4f1a\u81ea\u52a8\u5efa\u7acb\u6587\u4ef6\u5939\u7684bug\n* Added name and folder_path attributes to the Logger.\n \u589e\u52a0Logger\u7684name\u548cfolder_path\u5c5e\u6027\n* Try to fix the issue where the Logger did not automatically remove its own data from class attributes when it is destroyed.\n \u5c1d\u8bd5\u4fee\u590dLogger\u88ab\u5220\u9664\u65f6\u672a\u80fd\u81ea\u52a8\u5220\u9664\u7c7b\u5c5e\u6027\u4e2d\u7684\u81ea\u8eab\u6570\u636e\n\n#### v0.0.1.5\n\n* Fixed the error message of EventSignal signal class\n \u4fee\u6b63 EventSignal \u4fe1\u53f7\u7c7b\u7684\u62a5\u9519\u4fe1\u606f\n* Fixed the issue where numerical values and in-class flags were mixed in iter of StaticEnum\n \u4fee\u590dStaticEnum\u4e2d\u6570\u503c\u548c\u7c7b\u5185\u6807\u5fd7\u6df7\u5408\u5728iter\u4e2d\u7684\u95ee\u9898\n* Fixed a bug where disconnecting an EventSignal signal failed when the slot was another signal\n \u4fee\u6539 EventSignal \u4fe1\u53f7\u65ad\u5f00\u8fde\u63a5\u65f6, slot \u4e3a\u4fe1\u53f7\u65f6\u65e0\u6cd5\u65ad\u5f00\u7684 bug\n* Modified the actual connection signal class name in EventSignal\n \u4fee\u6539 EventSignal \u5b9e\u9645\u8fde\u63a5\u4fe1\u53f7\u7c7b\u540d \n* Added the display of the number of slot functions when printing EventSignal signals. It will be easier to debug\n \u589e\u52a0\u6253\u5370EventSignal \u4fe1\u53f7\u65f6\u5bf9\u69fd\u51fd\u6570\u6570\u91cf\u7684\u663e\u793a, \u4fbf\u4e8e\u8c03\u8bd5 \n* Modified the highlight enumeration class LogHighlightType to public access\n \u66f4\u6539\u9ad8\u4eae\u679a\u4e3e\u7c7b LogHighlightType \u4e3a\u516c\u5171\u8bbf\u95ee\n* Added a check in Logger and LoggerGroup to verify whether the log folder exists before writing to a file, preventing errors when the log folder is deleted during runtime\n \u589e\u52a0 Logger \u548c LoggerGroup \u5199\u5165\u6587\u4ef6\u524d\u5bf9\u6587\u4ef6\u5939\u662f\u5426\u5b58\u5728\u8fdb\u884c\u68c0\u67e5, \u4fdd\u8bc1\u8fd0\u884c\u65f6\u65e5\u5fd7\u6587\u4ef6\u5939\u88ab\u5220\u9664\u65f6\u4e0d\u4f1a\u53d1\u751f\u62a5\u9519 \n* Added an exclusion setting in LoggerGroup to prevent listening to certain loggers\n \u589e\u52a0 LoggerGroup \u6392\u9664\u5bf9\u67d0\u4e9b\u65e5\u5fd7\u5668\u76d1\u542c\u7684\u8bbe\u7f6e \n* Added the remove_listen_logging method to Logger\n \u65b0\u589e Logger \u7684 remove_listen_logging \u65b9\u6cd5 \n* Added the \\_\\_repr__ method to Logger\n \u589e\u52a0 Logger \u7684 \\_\\_repr__\u65b9\u6cd5\n* Fixed incorrect line breaks when the highlighting type is set to HTML\n \u4fee\u590d\u9ad8\u4eae\u7c7b\u578b\u4e3a HTML \u65f6, \u6362\u884c\u7b26\u4e0d\u5bf9\u7684 bug \n* Fixed list and connection errors when adding or removing logger listeners in LoggerGroup\n \u4fee\u590d LoggerGroup \u589e\u52a0\u65e5\u5fd7\u5668\u76d1\u542c\u548c\u79fb\u9664\u76d1\u542c\u65f6, \u5217\u8868\u548c\u8fde\u63a5\u7684\u9519\u8bef\n* Fixed a logic bug in LoggerGroup's remove_log method\n \u4fee\u590d LoggerGroup \u7684 remove_log \u903b\u8f91 bug\n* Fixed an issue where Logger was not removed from the logger list upon destruction\n \u4fee\u6539 Logger \u9500\u6bc1\u65f6\u6ca1\u6709\u79fb\u9664Logger\u5217\u8868\u4e2d\u7684\u81ea\u8eab\u5143\u7d20 \n* Removed the singleton mode of listeners in Logger\n \u53d6\u6d88 Logger \u4e2d\u76d1\u542c\u5668\u7684\u5355\u4f8b\u6a21\u5f0f\n* Refactored Logger and LoggerGroup parameters to follow the Qt-style approach. Some initialization parameters are retained, while others must be explicitly set via method calls\n \u5bf9 Logger \u548c LoggerGroup \u53c2\u6570\u4f20\u5165\u53c2\u8003qt\u98ce\u683c\u8fdb\u884c\u91cd\u6784, \u4fdd\u7559\u90e8\u5206\u521d\u59cb\u5316\u53c2\u6570, \u5176\u4f59\u53c2\u6570\u9700\u663e\u793a\u8c03\u7528\u65b9\u6cd5\u8fdb\u884c\u8bbe\u7f6e\n* Separated Logger's logging listener. If logging needs to be listened to, the method must be explicitly called to enable it\n \u5206\u79bb Logger \u5bf9 logging \u7684\u76d1\u542c, \u5982\u9700\u76d1\u542c\u5219\u9700\u663e\u793a\u8c03\u7528\u65b9\u6cd5\u8fdb\u884c\u8bbe\u7f6e\n\n#### v0.0.1.4\n\n* The new logger supports the exclusion of combined function names (such as `ClassA.func1`). Currently, only first-level combinations are supported, that is, the most recent class to which the method belongs must be consistent with the current class at the time of call.\n \u65b0\u589e\u65e5\u5fd7\u5668\u652f\u6301\u5bf9\u7ec4\u5408\u51fd\u6570\u540d(\u5982 `ClassA.func1`)\u7684\u6392\u9664. \u76ee\u524d\u4ec5\u652f\u6301\u4e00\u7ea7\u7ec4\u5408, \u5373\u65b9\u6cd5\u6240\u5c5e\u7684\u6700\u8fd1\u4e00\u7ea7\u7c7b\u5fc5\u987b\u4e0e\u8c03\u7528\u65f6\u7684\u5f53\u524d\u7c7b\u4e00\u81f4. \n* Fixed the issue that StaticEnum could add new properties outside, as well as the bug in data type errors in multi-layer nested classes inside.\n \u4fee\u590d StaticEnum \u53ef\u5728\u5916\u90e8\u65b0\u589e\u5c5e\u6027\u7684\u95ee\u9898, \u4ee5\u53ca\u5185\u90e8\u591a\u5c42\u5d4c\u5957\u7c7b\u7684\u6570\u636e\u7c7b\u578b\u9519\u8bef\u7684 bug. \n* Modified the way data types are converted in the StaticEnum metaclass, changed from the previous eval to created with the class.\n \u66f4\u6539\u4e86 StaticEnum \u5143\u7c7b\u4e2d\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u7684\u65b9\u5f0f, \u4ece\u4e4b\u524d\u7684eval\u66f4\u6539\u4e3a\u7528\u7c7b\u521b\u5efa. \n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Jf-JIN\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "A simple and miscellaneous utility library containing multiple utility scripts. \u4e00\u4e2a\u7b80\u5355\u4e14\u6742\u7684\u5de5\u5177\u5e93, \u5305\u542b\u591a\u4e2a\u5de5\u5177\u811a\u672c",
"version": "2.4.13",
"project_urls": {
"Documentation": "https://github.com/Jf-JIN/DToolslib/wiki",
"Homepage": "https://github.com/Jf-JIN/DToolslib",
"Repository": "https://github.com/Jf-JIN/DToolslib"
},
"split_keywords": [
"signal",
" logger",
" logging",
" enum",
" timer"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "30fa364811bd7c12f5d3981fe3c9f2dfdc2fda3de038f1d4f790f90ad9e9d6dc",
"md5": "1faeb3d017e65cdc1804d1d0af94a9e5",
"sha256": "f0ed8e6e390f2931927d93718fd80d36aafb9b9e4171121548d5c6fdb30d1cd9"
},
"downloads": -1,
"filename": "dtoolslib-2.4.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1faeb3d017e65cdc1804d1d0af94a9e5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 49522,
"upload_time": "2025-07-23T14:53:40",
"upload_time_iso_8601": "2025-07-23T14:53:40.895359Z",
"url": "https://files.pythonhosted.org/packages/30/fa/364811bd7c12f5d3981fe3c9f2dfdc2fda3de038f1d4f790f90ad9e9d6dc/dtoolslib-2.4.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9ed02d43cb37c4cc66ee996398b6c7aab908baa71e82e69b19a36aecf8bdd0dd",
"md5": "d0dbaf18e25b424fc0a51456c5006569",
"sha256": "0571384027c647a6bf47d5c1c4217bc6e02d63c4ef6ef2688edcd2d25fa9059d"
},
"downloads": -1,
"filename": "dtoolslib-2.4.13.tar.gz",
"has_sig": false,
"md5_digest": "d0dbaf18e25b424fc0a51456c5006569",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 43454,
"upload_time": "2025-07-23T14:53:42",
"upload_time_iso_8601": "2025-07-23T14:53:42.185227Z",
"url": "https://files.pythonhosted.org/packages/9e/d0/2d43cb37c4cc66ee996398b6c7aab908baa71e82e69b19a36aecf8bdd0dd/dtoolslib-2.4.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 14:53:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jf-JIN",
"github_project": "DToolslib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "dtoolslib"
}