psiutils 0.2.10__py3-none-any.whl → 0.2.12__py3-none-any.whl

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.
psiutils/__init__.py CHANGED
@@ -1,15 +0,0 @@
1
- # Dialog Status
2
- YES = True
3
- NO = False
4
- CANCEL = None
5
- NULL = 0
6
- EXIT = 1
7
- OK = 2
8
- UPDATED = 3
9
- ERROR = 4
10
-
11
- # Modes
12
- VIEW = 0
13
- NEW = 1
14
- EDIT = 2
15
- DELETE = 3
psiutils/_notify.py CHANGED
@@ -1,11 +1,17 @@
1
+ """Provide notifications on Linux platforms."""
1
2
 
2
- import gi
3
- gi.require_version('Gio', '2.0')
4
- gi.require_version('GioUnix', '2.0')
5
- gi.require_version('Notify', '0.7')
6
- from gi.repository import Notify
3
+ import platform
4
+
5
+ if platform.system() == 'Linux':
6
+ import gi
7
+ gi.require_version('Gio', '2.0')
8
+ gi.require_version('GioUnix', '2.0')
9
+ gi.require_version('Notify', '0.7')
10
+ from gi.repository import Notify
7
11
 
8
12
 
9
13
  def _notify(title: str, message: str) -> None:
14
+ if platform.system() != 'Linux':
15
+ return
10
16
  Notify.init(title)
11
17
  Notify.Notification.new(message).show()
psiutils/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.2.10'
1
+ __version__ = '0.2.11'
psiutils/buttons.py CHANGED
@@ -48,7 +48,7 @@ class IconButton(ttk.Frame):
48
48
  def __repr__(self) -> str:
49
49
  return f'IconButton: {self.text} {self.icon}'
50
50
 
51
- def state(self) -> dict:
51
+ def state(self, *args, **kwargs) -> dict:
52
52
  return self._state
53
53
 
54
54
  def enable(self, enable: bool = True) -> None:
psiutils/constants.py CHANGED
@@ -1,4 +1,6 @@
1
1
  """Constants for the tkinter psiutils."""
2
+ from enum import Enum, auto
3
+
2
4
  from .utilities import invert
3
5
  from .known_paths import get_documents_dir, get_downloads_dir
4
6
 
@@ -61,5 +63,23 @@ class Pad():
61
63
  N = (PAD, 0)
62
64
  S = (0, PAD)
63
65
 
66
+
64
67
  DOCUMENTS_DIR = get_documents_dir()
65
68
  DOWNLOADS_DIR = get_downloads_dir()
69
+
70
+
71
+ class Mode(Enum):
72
+ VIEW = auto()
73
+ NEW = auto()
74
+ EDIT = auto()
75
+ DELETE = auto()
76
+
77
+ class Status(Enum):
78
+ YES = True
79
+ NO = False
80
+ CANCEL = None
81
+ NULL = 0
82
+ EXIT = 1
83
+ OK = 2
84
+ UPDATED = 3
85
+ ERROR = 4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: psiutils
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Summary: Various TKinter utilities.
5
5
  Author: Jeff
6
6
  Author-email: Jeff <<jeffwatkins2000@gmail.com>>
@@ -9,14 +9,14 @@ Requires-Dist: markdown>=3.8.2
9
9
  Requires-Dist: packaging>=25.0
10
10
  Requires-Dist: pillow>=11.3.0
11
11
  Requires-Dist: pluggy>=1.6.0
12
- Requires-Dist: psi-toml>=0.0.12
13
- Requires-Dist: psiconfig>=0.0.14
12
+ Requires-Dist: psi-toml>=0.0.21
13
+ Requires-Dist: psiconfig>=0.0.15
14
14
  Requires-Dist: pygments>=2.19.2
15
15
  Requires-Dist: tkinterweb>=4.4.4
16
16
  Requires-Dist: tkinterweb-tkhtml>=1.1.1
17
17
  Requires-Dist: tomli>=2.2.1
18
18
  Requires-Dist: tomli-w>=1.2.0
19
- Requires-Python: ==3.13.*
19
+ Requires-Python: >=3.10, <3.13
20
20
  Description-Content-Type: text/markdown
21
21
 
22
22
  # psiutils
@@ -1,10 +1,10 @@
1
- psiutils/__init__.py,sha256=B8mLHCYCnD0LcwsGAtS3HM9kYdwVnhf6dNXL6i1H4kY,145
1
+ psiutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  psiutils/_about_frame.py,sha256=xZQivwvZc-k8C-SkwQne-dBr4gavDAL_32fv8E-7Wt0,7644
3
3
  psiutils/_logger.py,sha256=9nXxKWUyu4xqIILjTSUKRAMOG4cFy_EGJTTo0FtUAGU,2859
4
- psiutils/_notify.py,sha256=rGVPir7zVxDd52yt63xFFw7r_vZvusGue2BupJwECYU,266
5
- psiutils/_version.py,sha256=Sg_6D3b_dkjLywxS_G9vAU50xLvx_3hgYewd0IeIFAQ,22
6
- psiutils/buttons.py,sha256=iSsAyVXTcKxy5zjvBUB-TklsYOYtvTtWt3cTJynWhTc,8568
7
- psiutils/constants.py,sha256=T8AjYBkmuziAWjXgON-Sj0AM62NAGluj_Y6glrOFbHc,1107
4
+ psiutils/_notify.py,sha256=rQfYxPxsSwAEJBNXaAZSNlRmZLWB1sah1E1Oja9y-mw,437
5
+ psiutils/_version.py,sha256=MDWVRBs0IWHig-yP3jl_AM0VvBpaMmDN0nBK4Hl8Idk,22
6
+ psiutils/buttons.py,sha256=gnrEn8qk42SGf7dpdFqWlnxQFivBULlCAdeUIBeQZgE,8585
7
+ psiutils/constants.py,sha256=HUXNOy-V9zGkvWRfOFNttQlq9exFLPoRvPSAfSCeuIg,1366
8
8
  psiutils/drag_manager.py,sha256=L04GzKIinWXzGCawvTnn18F1AEt8PUPS1U-HqCVrh48,3470
9
9
  psiutils/errors.py,sha256=tAypFkpzpbeOppO9zKQimlnRVyr3sMPoiwh0yK3Yc88,562
10
10
  psiutils/icecream_init.py,sha256=ArKnRHGCyMfEwSykiHGdhBmX4JPhrgcpShii_GAPWLI,739
@@ -52,6 +52,6 @@ psiutils/text.py,sha256=HVJME2oUqeLZXCp2KaHg21vlp3CuhoP2T4T7ArqIxLs,3378
52
52
  psiutils/treeview.py,sha256=jtSzLWrnFIBDWV5YhWNRoZwgW-Kj8_7XVqZyusr-riQ,2826
53
53
  psiutils/utilities.py,sha256=bAoaYMumo0U8kz4pcPThYOY5Z3tPFe-a76Nhbwsd4lk,3005
54
54
  psiutils/widgets.py,sha256=ooGAy0IU3ct9aeqnBqMUr2AVyqg_zKHG8Fm9Gm-Wn5Y,11114
55
- psiutils-0.2.10.dist-info/WHEEL,sha256=Pi5uDq5Fdo_Rr-HD5h9BiPn9Et29Y9Sh8NhcJNnFU1c,79
56
- psiutils-0.2.10.dist-info/METADATA,sha256=yioxKjturjbmmVVCVuj7_rtF3A8wRhi2xY2UHeA9x0k,1977
57
- psiutils-0.2.10.dist-info/RECORD,,
55
+ psiutils-0.2.12.dist-info/WHEEL,sha256=pFCy50wRV2h7SjJ35YOsQUupaV45rMdgpNIvnXbG5bE,79
56
+ psiutils-0.2.12.dist-info/METADATA,sha256=yOG5ZW3MhjSDhwwXtga_znea2tNVXE0jyPPjhrS_-6s,1982
57
+ psiutils-0.2.12.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.8.17
2
+ Generator: uv 0.8.19
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any