README.md 7.6 KB
Newer Older
小康2022's avatar
小康2022 已提交
1
# 特别注意!此仓库已不再更新!项目已转到 GitHub,链接在下面:
小康2022's avatar
小康2022 已提交
2
# 仓库地址:https://github.com/Xiaokang2022/tkintertools
小康2022's avatar
小康2022 已提交
3 4
# 项目介绍地址:https://xiaokang2022.github.io/tkintertools/

小康2022's avatar
小康2022 已提交
5
<div align="center">
小康2022 已提交
6 7 8 9 10

# 🚀tkintertools🚀

<img src="tkt.png" style="height: 128px" alt="Logo" />

小康2022 已提交
11
`tkintertools` 是 Python3 内置模块 `tkinter` 的一个辅助开发模块\
小康2022 已提交
12
`tkintertools` is an auxiliary development module of the Python3 built-in module `tkinter`
小康2022 已提交
13

小康2022 已提交
14 15
[![Version](https://img.shields.io/pypi/v/tkintertools?label=Version)](.)
[![License](https://img.shields.io/pypi/l/tkintertools?label=License)](LICENSE.txt)
小康2022 已提交
16
[![ChangeLog](https://img.shields.io/badge/ChangeLog-2023/08/12-orange)](CHANGELOG.md)
小康2022 已提交
17
[![ToDo](https://img.shields.io/badge/ToDo-12-yellow)](TODO.md)
小康2022 已提交
18
[![Size](https://img.shields.io/github/languages/code-size/Xiaokang2022/tkintertools?label=Size)](tkintertools)
小康2022 已提交
19
[![Wiki](https://img.shields.io/badge/Wiki-14-purple)](https://github.com/Xiaokang2022/tkintertools/wiki)\
小康2022 已提交
20
[![Downloads](https://img.shields.io/pypi/dm/tkintertools?label=Downloads&logo=pypi)](https://pypistats.org/packages/tkintertools)
小康2022 已提交
21
[![Owner](https://img.shields.io/badge/Owner-Xiaokang2022-white)](https://github.com/Xiaokang2022)
小康2022 已提交
22 23 24 25 26
[![Blog](https://img.shields.io/badge/Blog-小康2022@CSDN-red)](https://xiaokang2022.blog.csdn.net)
[![Email](https://img.shields.io/badge/Email-2951256653@qq.com-cyan)](mailto:2951256653@qq.com)

[![Insights](https://repobeats.axiom.co/api/embed/ab8fae686a5a96f91fa71c40c53c189310924f5e.svg)](https://github.com/Xiaokang2022/tkintertools/pulse)

小康2022's avatar
小康2022 已提交
27 28
</div>

小康2022 已提交
29 30 31 32
Install/模块安装👇
-----------------

### Stable Version/稳定版本
小康2022's avatar
小康2022 已提交
33

小康2022 已提交
34 35
* Version/最新版本 : `2.6.10`
* Release/发布日期 : 2023/08/12 (UTC+08)
小康2022's avatar
小康2022 已提交
36

小康2022 已提交
37
这个是目前的最新稳定版,相对于开发版本而言比较稳定,bug 大体上是没有那么多的,推荐使用这个。稳定版和开发版相比,它在发布之前有个测试的步骤,经过测试之后(各项功能正常运行,多平台兼容)才会发布。
小康2022's avatar
小康2022 已提交
38

小康2022 已提交
39
**PIP Cmd/安装命令:**
小康2022's avatar
小康2022 已提交
40

小康2022 已提交
41
```
小康2022 已提交
42
pip install tkintertools==2.6.10
小康2022 已提交
43 44
```

小康2022 已提交
45
### Development Version/开发版本
小康2022's avatar
小康2022 已提交
46

小康2022 已提交
47 48
* Version/最新版本 : `2.6.10.dev1` (第 2 个预发布版本)
* Release/发布日期 : 2023/08/11 (UTC+08)
小康2022's avatar
小康2022 已提交
49

小康2022 已提交
50
这个是我正在开发的版本,可能有新功能,bug 可能会比较多,但也可能会比原来的版本更加稳定。开发版没有经过多操作系统的测试,仅能保证在 Windows 系统下运行所有功能,在其他的操作系统上,可能有部分功能无法正常运行。大家可以在 Issues 中提出一些建议,我可能会适当采纳一些并在开发版本中更改或实现。
小康2022 已提交
51

小康2022 已提交
52 53
**PIP Cmd/安装命令:**

小康2022's avatar
小康2022 已提交
54
```
小康2022 已提交
55
pip install tkintertools==2.6.10.dev1
小康2022's avatar
小康2022 已提交
56 57
```

小康2022 已提交
58 59
> **Warning**  
> 开发版仅作示例,各函数或类的 API 并非最终确定结果,直接使用开发版可能导致后续无法与稳定版兼容!  
小康2022 已提交
60
> 若不指定具体的版本号,则会下载最新的稳定版本,也就是说,开发版本只能通过指定的版本号获取!
小康2022 已提交
61

小康2022 已提交
62
### Requirements/环境需求
小康2022 已提交
63

小康2022 已提交
64
目前 **稳定版** 在以下操作系统中已经测试通过:
小康2022 已提交
65 66 67 68 69 70 71

![Windows10](https://img.shields.io/badge/Windows-10-green?logo=windows)
![Windows11](https://img.shields.io/badge/Windows-11-green?logo=windows11)
![Ubuntu22.04](https://img.shields.io/badge/Ubuntu-22.04-green?logo=ubuntu)

可能还有其他的操作系统也是可以运行 tkintertools 的,我没有进行更多的验证。  
没有任何额外的依赖包(除了一般 Python 内置的 tkinter),但只支持以下 Python 版本:
小康2022 已提交
72

小康2022 已提交
73 74 75 76 77
![Python3.8.*](https://img.shields.io/badge/Python-3.8.*-blue?logo=python)
![Python3.9.*](https://img.shields.io/badge/Python-3.9.*-blue?logo=python)
![Python3.10.*](https://img.shields.io/badge/Python-3.10.*-blue?logo=python)
![Python3.11.*](https://img.shields.io/badge/Python-3.11.*-blue?logo=python)
![Python3.12.*](https://img.shields.io/badge/Python-3.12.*-blue?logo=python)
小康2022 已提交
78

小康2022 已提交
79 80
如果拥有 PIL 库,则 tkintertools 会运行得更快,但 PIL 并不是必须的,没有 PIL 的情况下 tkintertools 依然可以正常使用。

小康2022 已提交
81 82
News/最新功能👇
--------------
小康2022 已提交
83

小康2022 已提交
84 85
### Release Notes/版本说明

小康2022 已提交
86
**最新版本: `tkintertools-v2.6.10`**
小康2022 已提交
87 88

> **Note**   
小康2022 已提交
89 90
> tkintertools 的介绍、使用教程和开发文档均在 [Wiki](https://github.com/Xiaokang2022/tkintertools/wiki) 中,大家可前往查阅  
> **后面的时间里,将对 tkintertools 进行重构,以修复和完善前期版本无法解决的问题,故短期内不再更新,敬请期待!**
小康2022 已提交
91

小康2022 已提交
92
下面是本次开发版本(`v2.6.9` -> `v2.6.10`)的更新内容条目:
小康2022 已提交
93

小康2022 已提交
94 95
- [X] Added file exceptions.py and exception classes `ScaleArgsValueError`, `ColorArgsValueError` and `WidgetStateModeError` to provide a description of some exceptions  
新增文件 exceptions.py 及异常类 `ScaleArgsValueError``ColorArgsValueError``WidgetStateModeError` 以提供部分异常的描述
小康2022 已提交
96 97 98 99 100 101
- [X] The widget `Progressbar` adds a indeterminate mode  
控件 `Progressbar` 新增不定模式
- [X] The value of the constant `SWITCH_WIDTH` is changed from 0 to 60  
常量 `SWITCH_WIDTH` 的值从 0 更改为 60
- [X] The parameter `width` of class `Switch` was changed from positional argument to keyword argument  
`Switch` 的参数 `width` 由位置参数更改为关键字参数
小康2022 已提交
102 103 104 105 106 107
- [X] Change the way the output is formatted in all code from the "%" mode to the more efficient f-string mode  
将所有代码中格式化输出的方式由 “%” 方式更改为效率更高的 f-string 方式
- [X] Optimized type hints for some code  
优化了部分代码的类型提示
- [X] Remove the function `text` and use f-string instead  
移除函数 `text`,可使用 f-string 来对其进行代替
小康2022 已提交
108

小康2022 已提交
109
### Template Demo/模板演示
小康2022 已提交
110

小康2022 已提交
111
下面是一个主要新功能的示例程序:进度条控件为不定模式
小康2022 已提交
112

小康2022 已提交
113
下面是示例程序的效果图(运行环境为 **Windows11 家庭中文版 23H2 - Python3.11.4**):
小康2022 已提交
114

小康2022 已提交
115
![news](news.png)
小康2022 已提交
116

小康2022 已提交
117
<details><summary><b>CODE/源代码</b></summary>
小康2022 已提交
118 119

```python
小康2022 已提交
120
# 此处只展示核心代码
小康2022 已提交
121

小康2022 已提交
122 123
pb = tkt.Progressbar(canvas, 320, 320, 640, 35, mode='indeterminate')  # 不定模式
pb.load(0.7)  # 加载到 70% 的状态
小康2022 已提交
124 125 126 127
```

</details>

小康2022 已提交
128 129
More/更多👇
-----------
小康2022 已提交
130

小康2022 已提交
131 132 133 134 135 136 137 138 139
[![GitHub](https://img.shields.io/badge/GitHub-仓库根源%20完整无误%20以此为准-blue?logo=github)](https://github.com/Xiaokang2022/tkintertools)
[![Gitee](https://img.shields.io/badge/Gitee-主镜像源%20比较完整%20可能延迟-green?logo=gitee)](https://gitee.com/xiaokang-2022/tkintertools)
[![GitCode](https://img.shields.io/badge/GitCode-次镜像源%20缺少Wiki%20CSDN-yellow)](https://gitcode.net/weixin_62651706/tkintertools)\
[![GitHub Watchers](https://img.shields.io/github/watchers/Xiaokang2022/tkintertools?label=GitHub%20Watchers&color=green)](https://github.com/Xiaokang2022/tkintertools/watchers)
[![GitHub Forks](https://img.shields.io/github/forks/Xiaokang2022/tkintertools?label=GitHub%20Forks)](https://github.com/Xiaokang2022/tkintertools/forks)
[![GitHub Stars](https://img.shields.io/github/stars/Xiaokang2022/tkintertools?label=GitHub%20Stars&color=gold)](https://github.com/Xiaokang2022/tkintertools/stargazers)
[![GitHub Contributors](https://img.shields.io/github/contributors/Xiaokang2022/tkintertools?label=GitHub%20Contributors)](https://github.com/Xiaokang2022/tkintertools/graphs/contributors)
[![GitHub Issues](https://img.shields.io/github/issues/Xiaokang2022/tkintertools?label=GitHub%20Issues)](https://github.com/Xiaokang2022/tkintertools/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/Xiaokang2022/tkintertools?label=GitHub%20Pull%20Requests)](https://github.com/Xiaokang2022/tkintertools/pulls)