simpletkbypraes 0.0.1__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.
- simpletkbypraes-0.0.1/PKG-INFO +28 -0
- simpletkbypraes-0.0.1/README.md +1 -0
- simpletkbypraes-0.0.1/setup.cfg +4 -0
- simpletkbypraes-0.0.1/setup.py +28 -0
- simpletkbypraes-0.0.1/simpletkbypraes/__init__.py +1 -0
- simpletkbypraes-0.0.1/simpletkbypraes/simpletk.py +113 -0
- simpletkbypraes-0.0.1/simpletkbypraes/test.py +8 -0
- simpletkbypraes-0.0.1/simpletkbypraes.egg-info/PKG-INFO +28 -0
- simpletkbypraes-0.0.1/simpletkbypraes.egg-info/SOURCES.txt +10 -0
- simpletkbypraes-0.0.1/simpletkbypraes.egg-info/dependency_links.txt +1 -0
- simpletkbypraes-0.0.1/simpletkbypraes.egg-info/requires.txt +1 -0
- simpletkbypraes-0.0.1/simpletkbypraes.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simpletkbypraes
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Module for simplification creating Tkinter GUI.
|
|
5
|
+
Home-page: https://github.com/praes666/simpletk
|
|
6
|
+
Author: PRAES666
|
|
7
|
+
Author-email: praesvip@mail.ru
|
|
8
|
+
Project-URL: Source, https://github.com/yourname/simpletk
|
|
9
|
+
Keywords: gui simplification
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.6
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: requests>=2.25.1
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: keywords
|
|
23
|
+
Dynamic: project-url
|
|
24
|
+
Dynamic: requires-dist
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
йоу
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
йоу
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
def readme():
|
|
4
|
+
with open('README.md', 'r', encoding='utf-8') as f:
|
|
5
|
+
return f.read()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name='simpletkbypraes',
|
|
9
|
+
version='0.0.1',
|
|
10
|
+
author='PRAES666',
|
|
11
|
+
author_email='praesvip@mail.ru',
|
|
12
|
+
description='Module for simplification creating Tkinter GUI.',
|
|
13
|
+
long_description=readme(),
|
|
14
|
+
long_description_content_type='text/markdown',
|
|
15
|
+
url='https://github.com/praes666/simpletk', # укажи реальный URL
|
|
16
|
+
packages=find_packages(),
|
|
17
|
+
install_requires=['requests>=2.25.1'],
|
|
18
|
+
classifiers=[
|
|
19
|
+
'Programming Language :: Python :: 3',
|
|
20
|
+
'License :: OSI Approved :: MIT License',
|
|
21
|
+
'Operating System :: OS Independent'
|
|
22
|
+
],
|
|
23
|
+
keywords='gui simplification',
|
|
24
|
+
project_urls={
|
|
25
|
+
'Source': 'https://github.com/yourname/simpletk'
|
|
26
|
+
},
|
|
27
|
+
python_requires='>=3.6',
|
|
28
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .simpletk import *
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
from tkinter import messagebox
|
|
3
|
+
|
|
4
|
+
class simpletk:
|
|
5
|
+
### base tkinter commands
|
|
6
|
+
def __init__(self, size='700x500', name='MyApp'):
|
|
7
|
+
self.root = tk.Tk()
|
|
8
|
+
self.root.geometry(size)
|
|
9
|
+
self.root.title(name)
|
|
10
|
+
self.root.resizable(False, False)
|
|
11
|
+
self._images = []
|
|
12
|
+
|
|
13
|
+
def run(self):
|
|
14
|
+
self.root.mainloop()
|
|
15
|
+
|
|
16
|
+
### universal functions to all types of widgets
|
|
17
|
+
def _parent(self, parent):
|
|
18
|
+
return parent if parent is not None else self.root
|
|
19
|
+
|
|
20
|
+
def _place(self, widget, x, y, w=None, h=None):
|
|
21
|
+
if w is None and h is None:
|
|
22
|
+
widget.place(x=x, y=y)
|
|
23
|
+
else:
|
|
24
|
+
widget.place(x=x, y=y, width=w, height=h)
|
|
25
|
+
|
|
26
|
+
def _create(self, widget_class, parent=None, x=0, y=0, w=None, h=None, **kwargs):
|
|
27
|
+
parent = self._parent(parent)
|
|
28
|
+
widget = widget_class(parent, **kwargs)
|
|
29
|
+
self._place(widget, x, y, w, h)
|
|
30
|
+
return widget
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### individual widgets realisation
|
|
34
|
+
def Frame(self, parent=None, x=0, y=0, w=100, h=100, color='#FFFFFF'):
|
|
35
|
+
return self._create(
|
|
36
|
+
tk.Frame,
|
|
37
|
+
parent,
|
|
38
|
+
x, y, w, h,
|
|
39
|
+
bg=color
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def Text(self, parent=None, text='text', x=0, y=0, size=14, color='#000000'):
|
|
43
|
+
return self._create(
|
|
44
|
+
tk.Label,
|
|
45
|
+
parent,
|
|
46
|
+
x, y,
|
|
47
|
+
text=text,
|
|
48
|
+
fg=color,
|
|
49
|
+
font=('Arial', size),
|
|
50
|
+
justify='left'
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def Button(
|
|
54
|
+
self,
|
|
55
|
+
parent=None,
|
|
56
|
+
text='Button',
|
|
57
|
+
x=0,
|
|
58
|
+
y=0,
|
|
59
|
+
w=100,
|
|
60
|
+
h=30,
|
|
61
|
+
bg='#E0E0E0',
|
|
62
|
+
fg='#000000',
|
|
63
|
+
size=12,
|
|
64
|
+
command=None
|
|
65
|
+
):
|
|
66
|
+
return self._create(
|
|
67
|
+
tk.Button,
|
|
68
|
+
parent,
|
|
69
|
+
x, y, w, h,
|
|
70
|
+
text=text,
|
|
71
|
+
bg=bg,
|
|
72
|
+
fg=fg,
|
|
73
|
+
font=('Arial', size),
|
|
74
|
+
command=command
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def Image(
|
|
78
|
+
self,
|
|
79
|
+
parent=None,
|
|
80
|
+
path=None,
|
|
81
|
+
image=None,
|
|
82
|
+
x=0,
|
|
83
|
+
y=0,
|
|
84
|
+
w=None,
|
|
85
|
+
h=None
|
|
86
|
+
):
|
|
87
|
+
if image is None and path is not None:
|
|
88
|
+
image = tk.PhotoImage(file=path)
|
|
89
|
+
|
|
90
|
+
if image is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
self._images.append(image)
|
|
94
|
+
return self._create(
|
|
95
|
+
tk.Label,
|
|
96
|
+
parent,
|
|
97
|
+
x, y, w, h,
|
|
98
|
+
image=image
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
def Alert(self, text='Alert', title='Message', type='info'):
|
|
102
|
+
if type == 'warning':
|
|
103
|
+
messagebox.showwarning(title, text)
|
|
104
|
+
elif type == 'error':
|
|
105
|
+
messagebox.showerror(title, text)
|
|
106
|
+
elif type == 'question':
|
|
107
|
+
return messagebox.askquestion(title, text)
|
|
108
|
+
elif type == 'yesno':
|
|
109
|
+
return messagebox.askyesno(title, text)
|
|
110
|
+
else:
|
|
111
|
+
messagebox.showinfo(title, text)
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simpletkbypraes
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Module for simplification creating Tkinter GUI.
|
|
5
|
+
Home-page: https://github.com/praes666/simpletk
|
|
6
|
+
Author: PRAES666
|
|
7
|
+
Author-email: praesvip@mail.ru
|
|
8
|
+
Project-URL: Source, https://github.com/yourname/simpletk
|
|
9
|
+
Keywords: gui simplification
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.6
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: requests>=2.25.1
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: keywords
|
|
23
|
+
Dynamic: project-url
|
|
24
|
+
Dynamic: requires-dist
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
йоу
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
setup.py
|
|
3
|
+
simpletkbypraes/__init__.py
|
|
4
|
+
simpletkbypraes/simpletk.py
|
|
5
|
+
simpletkbypraes/test.py
|
|
6
|
+
simpletkbypraes.egg-info/PKG-INFO
|
|
7
|
+
simpletkbypraes.egg-info/SOURCES.txt
|
|
8
|
+
simpletkbypraes.egg-info/dependency_links.txt
|
|
9
|
+
simpletkbypraes.egg-info/requires.txt
|
|
10
|
+
simpletkbypraes.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.25.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
simpletkbypraes
|