kenenet 0.0.9__py3-none-any.whl → 0.1.0__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.
- kenenet/__init__.py +14 -7
- {kenenet-0.0.9.dist-info → kenenet-0.1.0.dist-info}/METADATA +1 -1
- kenenet-0.1.0.dist-info/RECORD +5 -0
- kenenet-0.0.9.dist-info/RECORD +0 -5
- {kenenet-0.0.9.dist-info → kenenet-0.1.0.dist-info}/WHEEL +0 -0
- {kenenet-0.0.9.dist-info → kenenet-0.1.0.dist-info}/top_level.txt +0 -0
kenenet/__init__.py
CHANGED
@@ -1,21 +1,28 @@
|
|
1
|
-
import inspect, sys
|
1
|
+
import inspect, sys, zhmiscellany, keyboard
|
2
|
+
from PIL import ImageGrab
|
2
3
|
|
3
4
|
def adding(a, b):
|
4
5
|
return a + b
|
5
6
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
7
|
+
def get_pos(key='f10', kill=False):
|
8
|
+
def _get_pos(key):
|
9
|
+
keyboard.wait(key)
|
10
|
+
image = ImageGrab.grab()
|
11
|
+
x, y = zhmiscellany.misc.get_mouse_xy()
|
12
|
+
rgb = image.getpixel((x, y))
|
13
|
+
print(f"Coordinates: ({x}, {y}), RGB: {rgb}")
|
14
|
+
if kill:
|
15
|
+
print('killing process')
|
16
|
+
zhmiscellany.misc.die()
|
17
|
+
zhmiscellany.processing.start_daemon(target=_get_pos, args=(key,))
|
18
|
+
|
9
19
|
class k:
|
10
20
|
pass
|
11
21
|
|
12
|
-
# Automatically attach all global functions to class k,
|
13
|
-
# filtering out any that start with an underscore (like __init__)
|
14
22
|
current_module = sys.modules[__name__]
|
15
23
|
for name, func in inspect.getmembers(current_module, inspect.isfunction):
|
16
24
|
if not name.startswith('_'):
|
17
25
|
setattr(k, name, func)
|
18
26
|
|
19
|
-
# Optional: update __main__ if needed
|
20
27
|
if '__main__' in sys.modules:
|
21
28
|
sys.modules['__main__'].__dict__['k'] = k
|
@@ -0,0 +1,5 @@
|
|
1
|
+
kenenet/__init__.py,sha256=E6cw5FPD1ScpoBCdNnSEvrsKM5A4jADmvmFHNUN5S-M,832
|
2
|
+
kenenet-0.1.0.dist-info/METADATA,sha256=HBumeS-txu9M6Yt8dTZ60zJGfq1NshS_ilYqMsyiGsM,513
|
3
|
+
kenenet-0.1.0.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
+
kenenet-0.1.0.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
+
kenenet-0.1.0.dist-info/RECORD,,
|
kenenet-0.0.9.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
kenenet/__init__.py,sha256=cyx5bMAIW8nut4ypoPkhpiKwmt0kRtfXOrXVij3BtXU,552
|
2
|
-
kenenet-0.0.9.dist-info/METADATA,sha256=w7TWDhyTVyi8l_jjY_fdVC6cVZQyXfBIwVTcpM3FtW4,513
|
3
|
-
kenenet-0.0.9.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
4
|
-
kenenet-0.0.9.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
|
5
|
-
kenenet-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|