douftp-client 0.1.0__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.
- douftp_client-0.1.0/LICENSE +21 -0
- douftp_client-0.1.0/PKG-INFO +132 -0
- douftp_client-0.1.0/README.md +97 -0
- douftp_client-0.1.0/pyproject.toml +53 -0
- douftp_client-0.1.0/setup.cfg +4 -0
- douftp_client-0.1.0/src/douftp_client/__init__.py +19 -0
- douftp_client-0.1.0/src/douftp_client/__main__.py +8 -0
- douftp_client-0.1.0/src/douftp_client/app.py +23 -0
- douftp_client-0.1.0/src/douftp_client/cli.py +38 -0
- douftp_client-0.1.0/src/douftp_client/components/__init__.py +7 -0
- douftp_client-0.1.0/src/douftp_client/components/app_menu.py +412 -0
- douftp_client-0.1.0/src/douftp_client/components/app_view.py +861 -0
- douftp_client-0.1.0/src/douftp_client/components/local_file_context_menu.py +360 -0
- douftp_client-0.1.0/src/douftp_client/components/local_file_list.py +486 -0
- douftp_client-0.1.0/src/douftp_client/components/remote_file_context_menu.py +531 -0
- douftp_client-0.1.0/src/douftp_client/components/remote_file_list.py +311 -0
- douftp_client-0.1.0/src/douftp_client/components/session_tabs.py +159 -0
- douftp_client-0.1.0/src/douftp_client/components/theme.py +176 -0
- douftp_client-0.1.0/src/douftp_client/components/transfer_queue.py +235 -0
- douftp_client-0.1.0/src/douftp_client/components/transfer_status.py +57 -0
- douftp_client-0.1.0/src/douftp_client/libs/__init__.py +3 -0
- douftp_client-0.1.0/src/douftp_client/libs/config.py +168 -0
- douftp_client-0.1.0/src/douftp_client/libs/functions.py +148 -0
- douftp_client-0.1.0/src/douftp_client/libs/global_variable.py +26 -0
- douftp_client-0.1.0/src/douftp_client/resource/image/crogram.png +0 -0
- douftp_client-0.1.0/src/douftp_client/window/__init__.py +7 -0
- douftp_client-0.1.0/src/douftp_client/window/about.py +62 -0
- douftp_client-0.1.0/src/douftp_client/window/bookmark_manager.py +228 -0
- douftp_client-0.1.0/src/douftp_client/window/file_properties.py +464 -0
- douftp_client-0.1.0/src/douftp_client/window/transfer_history.py +93 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/PKG-INFO +132 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/SOURCES.txt +38 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/dependency_links.txt +1 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/entry_points.txt +2 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/requires.txt +5 -0
- douftp_client-0.1.0/src/douftp_client.egg-info/top_level.txt +2 -0
- douftp_client-0.1.0/tests/test_config.py +124 -0
- douftp_client-0.1.0/tests/test_functions.py +90 -0
- douftp_client-0.1.0/tests/test_session_tabs.py +333 -0
- douftp_client-0.1.0/tests/test_theme.py +201 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Jackson Dou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: douftp-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 基于 tkinter 的 FTP/FTPS 客户端:多标签会话、传输队列、断点续传、书签与明暗主题
|
|
5
|
+
Author: DouFTP Team
|
|
6
|
+
Maintainer: Jackson Dou
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://douftp.com
|
|
9
|
+
Project-URL: Repository, https://github.com/douftp/douftp-client
|
|
10
|
+
Project-URL: Changelog, https://github.com/douftp/douftp-client/releases
|
|
11
|
+
Keywords: ftp,ftps,client,gui,tkinter,file-transfer
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: MacOS X
|
|
14
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
15
|
+
Classifier: Environment :: X11 Applications
|
|
16
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Topic :: Desktop Environment :: File Managers
|
|
26
|
+
Classifier: Topic :: Internet :: File Transfer Protocol (FTP)
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: Pillow>=9.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
33
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# DouFTP Client
|
|
37
|
+
|
|
38
|
+
基于 tkinter 的 FTP / FTPS 图形界面客户端。
|
|
39
|
+
|
|
40
|
+
## 功能特性
|
|
41
|
+
|
|
42
|
+
- 标准 FTP 与显式 FTPS(AUTH TLS,数据连接加密)
|
|
43
|
+
- 多标签会话:同时连接、浏览多台服务器,各自独立连接与路径
|
|
44
|
+
- 传输队列:串行执行、暂停/停止、失败自动重试(最多 3 次)
|
|
45
|
+
- 断点续传:下载 `REST` 续写、上传 `SIZE + APPE/REST` 续传
|
|
46
|
+
- 传输历史窗口、最近连接、书签管理(站点管理器)
|
|
47
|
+
- 明暗主题切换,选择持久化
|
|
48
|
+
- 全部远程操作异步执行,界面不阻塞
|
|
49
|
+
- FTP 错误码分类提示(530/550/553/425/421 等)
|
|
50
|
+
|
|
51
|
+
## 安装
|
|
52
|
+
|
|
53
|
+
### 从 PyPI 安装
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install douftp-client
|
|
57
|
+
douftp # 启动客户端
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
> tkinter 是 Python 标准库组件,无法通过 pip 安装:
|
|
61
|
+
> macOS 建议使用 python.org 官方安装包;Debian/Ubuntu 需 `sudo apt install python3-tk`。
|
|
62
|
+
|
|
63
|
+
### 从源码安装(开发)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git clone https://github.com/douftp/douftp-client.git
|
|
67
|
+
cd douftp-client
|
|
68
|
+
pip install -e ".[dev]"
|
|
69
|
+
douftp
|
|
70
|
+
# 或直接运行
|
|
71
|
+
python -m douftp_client
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 使用
|
|
75
|
+
|
|
76
|
+
1. 快速连接栏填入主机、端口、账号、密码,按需勾选 `TLS`,点击「快速连接」
|
|
77
|
+
2. 左侧为本地目录,右侧为远程目录(标签页形式,`Command+T` 新建标签、`Command+W` 关闭)
|
|
78
|
+
3. 双击/右键进行浏览、上传、下载、重命名、递归删除等操作
|
|
79
|
+
4. 「查看 → 传输历史 / 主题」查看传输记录、切换明暗主题
|
|
80
|
+
|
|
81
|
+
详细说明见 [docs/USER_GUIDE.md](docs/USER_GUIDE.md)。
|
|
82
|
+
|
|
83
|
+
## 配置文件
|
|
84
|
+
|
|
85
|
+
| 用途 | 路径 |
|
|
86
|
+
| ---- | ---- |
|
|
87
|
+
| 最近连接 | `~/.douftp/connections.json` |
|
|
88
|
+
| 书签 | `~/.douftp/bookmarks.json` |
|
|
89
|
+
| 应用设置(主题等) | `~/.douftp/settings.json` |
|
|
90
|
+
|
|
91
|
+
均不保存密码。
|
|
92
|
+
|
|
93
|
+
## 项目结构
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
douftp-client/
|
|
97
|
+
├── pyproject.toml # PEP 621 打包配置
|
|
98
|
+
├── src/
|
|
99
|
+
│ └── douftp_client/ # 包
|
|
100
|
+
│ ├── __init__.py # 版本信息
|
|
101
|
+
│ ├── __main__.py # python -m douftp_client
|
|
102
|
+
│ ├── cli.py # douftp 命令入口
|
|
103
|
+
│ ├── app.py # Tk 主窗口
|
|
104
|
+
│ ├── components/ # UI 组件(菜单/视图/文件列表/会话标签/主题/队列)
|
|
105
|
+
│ ├── libs/ # 配置存储、通用函数、全局变量
|
|
106
|
+
│ ├── window/ # 独立窗口(关于/书签/传输历史/文件属性)
|
|
107
|
+
│ └── resource/ # 图片资源(随包分发)
|
|
108
|
+
├── tests/ # 无 GUI 单元测试(unittest)
|
|
109
|
+
└── docs/ # 用户手册、发布说明
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 测试
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
python -m unittest discover -s tests
|
|
116
|
+
python tests/manual_smoke_start.py # 无头启动冒烟
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 发布(PyPI)
|
|
120
|
+
|
|
121
|
+
详见 [docs/RELEASING.md](docs/RELEASING.md)。简要步骤:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
python -m pip install -U build twine
|
|
125
|
+
python -m build # 生成 dist/*.whl 与 *.tar.gz
|
|
126
|
+
python -m twine check dist/*
|
|
127
|
+
python -m twine upload dist/*
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 许可证
|
|
131
|
+
|
|
132
|
+
MIT,见 [LICENSE](LICENSE)。
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# DouFTP Client
|
|
2
|
+
|
|
3
|
+
基于 tkinter 的 FTP / FTPS 图形界面客户端。
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- 标准 FTP 与显式 FTPS(AUTH TLS,数据连接加密)
|
|
8
|
+
- 多标签会话:同时连接、浏览多台服务器,各自独立连接与路径
|
|
9
|
+
- 传输队列:串行执行、暂停/停止、失败自动重试(最多 3 次)
|
|
10
|
+
- 断点续传:下载 `REST` 续写、上传 `SIZE + APPE/REST` 续传
|
|
11
|
+
- 传输历史窗口、最近连接、书签管理(站点管理器)
|
|
12
|
+
- 明暗主题切换,选择持久化
|
|
13
|
+
- 全部远程操作异步执行,界面不阻塞
|
|
14
|
+
- FTP 错误码分类提示(530/550/553/425/421 等)
|
|
15
|
+
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
### 从 PyPI 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install douftp-client
|
|
22
|
+
douftp # 启动客户端
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> tkinter 是 Python 标准库组件,无法通过 pip 安装:
|
|
26
|
+
> macOS 建议使用 python.org 官方安装包;Debian/Ubuntu 需 `sudo apt install python3-tk`。
|
|
27
|
+
|
|
28
|
+
### 从源码安装(开发)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/douftp/douftp-client.git
|
|
32
|
+
cd douftp-client
|
|
33
|
+
pip install -e ".[dev]"
|
|
34
|
+
douftp
|
|
35
|
+
# 或直接运行
|
|
36
|
+
python -m douftp_client
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 使用
|
|
40
|
+
|
|
41
|
+
1. 快速连接栏填入主机、端口、账号、密码,按需勾选 `TLS`,点击「快速连接」
|
|
42
|
+
2. 左侧为本地目录,右侧为远程目录(标签页形式,`Command+T` 新建标签、`Command+W` 关闭)
|
|
43
|
+
3. 双击/右键进行浏览、上传、下载、重命名、递归删除等操作
|
|
44
|
+
4. 「查看 → 传输历史 / 主题」查看传输记录、切换明暗主题
|
|
45
|
+
|
|
46
|
+
详细说明见 [docs/USER_GUIDE.md](docs/USER_GUIDE.md)。
|
|
47
|
+
|
|
48
|
+
## 配置文件
|
|
49
|
+
|
|
50
|
+
| 用途 | 路径 |
|
|
51
|
+
| ---- | ---- |
|
|
52
|
+
| 最近连接 | `~/.douftp/connections.json` |
|
|
53
|
+
| 书签 | `~/.douftp/bookmarks.json` |
|
|
54
|
+
| 应用设置(主题等) | `~/.douftp/settings.json` |
|
|
55
|
+
|
|
56
|
+
均不保存密码。
|
|
57
|
+
|
|
58
|
+
## 项目结构
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
douftp-client/
|
|
62
|
+
├── pyproject.toml # PEP 621 打包配置
|
|
63
|
+
├── src/
|
|
64
|
+
│ └── douftp_client/ # 包
|
|
65
|
+
│ ├── __init__.py # 版本信息
|
|
66
|
+
│ ├── __main__.py # python -m douftp_client
|
|
67
|
+
│ ├── cli.py # douftp 命令入口
|
|
68
|
+
│ ├── app.py # Tk 主窗口
|
|
69
|
+
│ ├── components/ # UI 组件(菜单/视图/文件列表/会话标签/主题/队列)
|
|
70
|
+
│ ├── libs/ # 配置存储、通用函数、全局变量
|
|
71
|
+
│ ├── window/ # 独立窗口(关于/书签/传输历史/文件属性)
|
|
72
|
+
│ └── resource/ # 图片资源(随包分发)
|
|
73
|
+
├── tests/ # 无 GUI 单元测试(unittest)
|
|
74
|
+
└── docs/ # 用户手册、发布说明
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 测试
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
python -m unittest discover -s tests
|
|
81
|
+
python tests/manual_smoke_start.py # 无头启动冒烟
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 发布(PyPI)
|
|
85
|
+
|
|
86
|
+
详见 [docs/RELEASING.md](docs/RELEASING.md)。简要步骤:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
python -m pip install -U build twine
|
|
90
|
+
python -m build # 生成 dist/*.whl 与 *.tar.gz
|
|
91
|
+
python -m twine check dist/*
|
|
92
|
+
python -m twine upload dist/*
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 许可证
|
|
96
|
+
|
|
97
|
+
MIT,见 [LICENSE](LICENSE)。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "douftp-client"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "基于 tkinter 的 FTP/FTPS 客户端:多标签会话、传输队列、断点续传、书签与明暗主题"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "DouFTP Team" }]
|
|
13
|
+
maintainers = [{ name = "Jackson Dou" }]
|
|
14
|
+
keywords = ["ftp", "ftps", "client", "gui", "tkinter", "file-transfer"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Environment :: MacOS X",
|
|
18
|
+
"Environment :: Win32 (MS Windows)",
|
|
19
|
+
"Environment :: X11 Applications",
|
|
20
|
+
"Intended Audience :: End Users/Desktop",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Topic :: Desktop Environment :: File Managers",
|
|
30
|
+
"Topic :: Internet :: File Transfer Protocol (FTP)",
|
|
31
|
+
]
|
|
32
|
+
dependencies = ["Pillow>=9.0"]
|
|
33
|
+
|
|
34
|
+
[project.optional-dependencies]
|
|
35
|
+
dev = ["build>=1.0", "twine>=4.0"]
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
douftp = "douftp_client.cli:main"
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Homepage = "https://douftp.com"
|
|
42
|
+
Repository = "https://github.com/douftp/douftp-client"
|
|
43
|
+
Changelog = "https://github.com/douftp/douftp-client/releases"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools]
|
|
46
|
+
package-dir = { "" = "src" }
|
|
47
|
+
include-package-data = true
|
|
48
|
+
|
|
49
|
+
[tool.setuptools.packages.find]
|
|
50
|
+
where = ["src"]
|
|
51
|
+
|
|
52
|
+
[tool.setuptools.package-data]
|
|
53
|
+
douftp_client = ["resource/image/*.png"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env python3.9
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""DouFTP Client —— 基于 tkinter 的 FTP/FTPS 客户端
|
|
4
|
+
|
|
5
|
+
特性:多标签会话、传输队列与断点续传、传输历史、书签管理、明暗主题、FTPS。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.2.0"
|
|
9
|
+
__author__ = "DouFTP Team"
|
|
10
|
+
__license__ = "MIT"
|
|
11
|
+
|
|
12
|
+
__all__ = ["__version__", "main"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main():
|
|
16
|
+
"""包级入口(延迟导入,避免导入包时加载 GUI)"""
|
|
17
|
+
from douftp_client.cli import main as _main
|
|
18
|
+
|
|
19
|
+
return _main()
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env python3.9
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""DOUFTP CLIENT APPLICATION —— Tk 主窗口"""
|
|
4
|
+
|
|
5
|
+
from tkinter import Tk
|
|
6
|
+
|
|
7
|
+
from douftp_client.components import app_view
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class App(Tk):
|
|
11
|
+
"""Application Class"""
|
|
12
|
+
|
|
13
|
+
def __init__(self):
|
|
14
|
+
Tk.__init__(self)
|
|
15
|
+
app_view.ftp_client(self)
|
|
16
|
+
self.mainloop()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if __name__ == "__main__":
|
|
20
|
+
# 兼容直接运行:python -m douftp_client.app
|
|
21
|
+
from douftp_client.cli import main
|
|
22
|
+
|
|
23
|
+
main()
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env python3.9
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
"""命令行入口:console_scripts / gui_scripts 的 douftp 命令"""
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
from douftp_client import __version__
|
|
9
|
+
from douftp_client.libs import global_variable as GV
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main(argv=None):
|
|
13
|
+
"""启动 DouFTP 客户端 GUI"""
|
|
14
|
+
del argv # 预留参数位,当前无命令行选项
|
|
15
|
+
try:
|
|
16
|
+
from tkinter import Tk # noqa: F401 提前检测 tkinter 可用性
|
|
17
|
+
except ImportError:
|
|
18
|
+
sys.stderr.write(
|
|
19
|
+
"错误: 当前 Python 环境缺少 tkinter。\n"
|
|
20
|
+
"请安装带 tkinter 的 Python(macOS 可用 python.org 官方安装包,"
|
|
21
|
+
"Debian/Ubuntu 可安装 python3-tk)。\n"
|
|
22
|
+
)
|
|
23
|
+
return 1
|
|
24
|
+
|
|
25
|
+
GV._init()
|
|
26
|
+
GV._set("APP_NAME", "DouFTP")
|
|
27
|
+
# 包内资源目录(logo 等)
|
|
28
|
+
GV._set("APP_PATH", os.path.dirname(os.path.abspath(__file__)))
|
|
29
|
+
GV._set("APP_VERSION", __version__)
|
|
30
|
+
|
|
31
|
+
from douftp_client.app import App
|
|
32
|
+
|
|
33
|
+
App()
|
|
34
|
+
return 0
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
sys.exit(main())
|