PyNexusAPI 1.0b0__py3-none-any.whl → 1.0.2b0__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.
- pynexusapi/__init__.py +23 -19
- {pynexusapi-1.0b0.dist-info → pynexusapi-1.0.2b0.dist-info}/METADATA +28 -2
- pynexusapi-1.0.2b0.dist-info/RECORD +5 -0
- pynexusapi-1.0b0.dist-info/RECORD +0 -5
- {pynexusapi-1.0b0.dist-info → pynexusapi-1.0.2b0.dist-info}/WHEEL +0 -0
- {pynexusapi-1.0b0.dist-info → pynexusapi-1.0.2b0.dist-info}/top_level.txt +0 -0
pynexusapi/__init__.py
CHANGED
|
@@ -7,14 +7,19 @@ import time
|
|
|
7
7
|
import datetime
|
|
8
8
|
import keyboard
|
|
9
9
|
import pyperclip
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
10
|
+
if os.name == "nt":
|
|
11
|
+
import win32clipboard
|
|
12
|
+
import win32con
|
|
13
|
+
import ctypes
|
|
14
|
+
from ctypes import wintypes
|
|
15
|
+
else:
|
|
14
16
|
import warnings
|
|
15
17
|
import customtkinter as ctk
|
|
18
|
+
import builtins
|
|
19
|
+
# I import actions not when then needed because it will slow down it when functions is on, what did i just spell?
|
|
16
20
|
|
|
17
|
-
print("Thanks for using PyNexusAPI by PyNoob CaSP Software (C) 2026! This message can be deleted by going into project's file and just uhm like deleting it..")
|
|
21
|
+
# print("Thanks for using PyNexusAPI by PyNoob CaSP Software (C) 2026! This message can be deleted by going into project's file and just uhm like deleting it..")
|
|
22
|
+
# deleted for good no being pygame
|
|
18
23
|
|
|
19
24
|
class DROPFILES(ctypes.Structure):
|
|
20
25
|
_fields_ = [
|
|
@@ -143,9 +148,11 @@ class Clipboard:
|
|
|
143
148
|
|
|
144
149
|
@staticmethod
|
|
145
150
|
def CopyAny(file_path):
|
|
151
|
+
if sys.platform != "win32":
|
|
152
|
+
raise OSError("Clipboard.CopyAny can be only executed on Microsoft Windows.")
|
|
146
153
|
abs_path = os.path.abspath(file_path)
|
|
147
154
|
if not os.path.exists(abs_path):
|
|
148
|
-
raise FileNotFoundError(f"
|
|
155
|
+
raise FileNotFoundError(f"File with path {abs_path} is not found because it doesn't exist.")
|
|
149
156
|
file_str = abs_path + "\x00\x00"
|
|
150
157
|
file_bytes = file_str.encode("utf-16-le")
|
|
151
158
|
dropfiles = DROPFILES()
|
|
@@ -222,6 +229,7 @@ class Time:
|
|
|
222
229
|
@staticmethod
|
|
223
230
|
def Wait(seconds):
|
|
224
231
|
secs = str(seconds).strip()
|
|
232
|
+
# this doesnt work for some reason idk why >.<
|
|
225
233
|
if len(secs) == 0:
|
|
226
234
|
secs = 5.0
|
|
227
235
|
warnings.warn("Requested empty time in PyNexusAPI.Time.Wait(). Automatically converted to 5 seconds.", SyntaxWarning)
|
|
@@ -259,8 +267,9 @@ class Screen:
|
|
|
259
267
|
return None
|
|
260
268
|
|
|
261
269
|
class Windows:
|
|
262
|
-
if sys.platform != "win32":
|
|
263
|
-
raise OSError("Class PyNexusAPI.Windows can only be executed on Microsoft Windows")
|
|
270
|
+
# if sys.platform != "win32":
|
|
271
|
+
# raise OSError("Class PyNexusAPI.Windows can only be executed on Microsoft Windows")
|
|
272
|
+
# deleted for now just please dont be stupid
|
|
264
273
|
|
|
265
274
|
@staticmethod
|
|
266
275
|
def GetActiveTitle():
|
|
@@ -311,8 +320,9 @@ class Windows:
|
|
|
311
320
|
raise LookupError(f"Window with title '{window_title}' not found.")
|
|
312
321
|
|
|
313
322
|
class macOS:
|
|
314
|
-
if sys.platform != "darwin":
|
|
315
|
-
raise OSError("Class PyNexusAPI.macOS can only be executed on macOS.")
|
|
323
|
+
# if sys.platform != "darwin":
|
|
324
|
+
# raise OSError("Class PyNexusAPI.macOS can only be executed on macOS.")
|
|
325
|
+
# deleted for now just please dont be stupid
|
|
316
326
|
|
|
317
327
|
@staticmethod
|
|
318
328
|
def Close(app_name):
|
|
@@ -336,8 +346,9 @@ class macOS:
|
|
|
336
346
|
|
|
337
347
|
|
|
338
348
|
class Linux:
|
|
339
|
-
if os.name != "posix" or sys.platform == "darwin":
|
|
340
|
-
raise OSError("Class PyNexusAPI.Linux can only be executed on Linux.")
|
|
349
|
+
# if os.name != "posix" or sys.platform == "darwin":
|
|
350
|
+
# raise OSError("Class PyNexusAPI.Linux can only be executed on Linux.")
|
|
351
|
+
# deleted for now just please dont be stupid
|
|
341
352
|
|
|
342
353
|
@staticmethod
|
|
343
354
|
def _check_wmctrl():
|
|
@@ -384,12 +395,10 @@ class Log:
|
|
|
384
395
|
Log._orig_print(f"[PyNexusAPI.Log] Error: Unable to log: {e}")
|
|
385
396
|
except:
|
|
386
397
|
pass
|
|
387
|
-
import builtins
|
|
388
398
|
builtins.print = log_print
|
|
389
399
|
|
|
390
400
|
@staticmethod
|
|
391
401
|
def Unhook():
|
|
392
|
-
import builtins
|
|
393
402
|
builtins.print = Log._orig_print
|
|
394
403
|
|
|
395
404
|
class App:
|
|
@@ -400,30 +409,25 @@ class App:
|
|
|
400
409
|
self.window.title(title)
|
|
401
410
|
self.window.geometry(size)
|
|
402
411
|
|
|
403
|
-
@staticmethod
|
|
404
412
|
def AddText(self, text, font_size=16, pady=10):
|
|
405
413
|
label = ctk.CTkLabel(self.window, text=text, font=("Arial", font_size))
|
|
406
414
|
label.pack(pady=pady)
|
|
407
415
|
return label
|
|
408
416
|
|
|
409
|
-
@staticmethod
|
|
410
417
|
def AddButton(self, text, command, pady=10):
|
|
411
418
|
btn = ctk.CTkButton(self.window, text=text, command=command)
|
|
412
419
|
btn.pack(pady=pady)
|
|
413
420
|
return btn
|
|
414
421
|
|
|
415
|
-
@staticmethod
|
|
416
422
|
def AddInput(self, placeholder="Input something...", width=250, pady=10):
|
|
417
423
|
entry = ctk.CTkEntry(self.window, placeholder_text=placeholder, width=width)
|
|
418
424
|
entry.pack(pady=pady)
|
|
419
425
|
return entry
|
|
420
426
|
|
|
421
|
-
@staticmethod
|
|
422
427
|
def AddCheckbox(self, text, command=None, pady=10):
|
|
423
428
|
checkbox = ctk.CTkCheckBox(self.window, text=text, command=command)
|
|
424
429
|
checkbox.pack(pady=pady)
|
|
425
430
|
return checkbox
|
|
426
431
|
|
|
427
|
-
@staticmethod
|
|
428
432
|
def Run(self):
|
|
429
433
|
self.window.mainloop()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyNexusAPI
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0.2b0
|
|
4
4
|
Summary: A massive bundle bridge for lazy developers to control OS, GUI, Keyboard and Mouse
|
|
5
5
|
Author: Noob3ButUkr
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -24,5 +24,31 @@ Dynamic: summary
|
|
|
24
24
|
|
|
25
25
|
\# PyNexusAPI (no not GD nexus, it would be Pyfnm04API then.)
|
|
26
26
|
|
|
27
|
-
The ultimate bridge between lazy developers and low-level libraries, designed for good
|
|
27
|
+
The ultimate bridge between lazy developers and low-level libraries, designed for good.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Usage:
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Recomended to use "import PyNexusAPI as nexus" or "as pn"
|
|
36
|
+
|
|
37
|
+
Also - modules macOS, Linux, Windows are not cross-platform.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
from PyNexusAPI import Mouse, Keyboard, Clipboard
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
Mouse.LeftClick()
|
|
46
|
+
|
|
47
|
+
Keyboard.FWrite("Hello world!")
|
|
48
|
+
|
|
49
|
+
Clipboard.CopyText("Hello world! x2")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Note: Clipboard.CopyAny works ONLY for Windows.
|
|
28
54
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
pynexusapi/__init__.py,sha256=aGB1krjAjkj3RPwb7kNkCWC25y2qcZjmugLAquedRIk,15326
|
|
2
|
+
pynexusapi-1.0.2b0.dist-info/METADATA,sha256=oGaBNnNPY_mkvc6POEk3miTtuNPKvGi0JfOrEptT4Ww,1266
|
|
3
|
+
pynexusapi-1.0.2b0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
4
|
+
pynexusapi-1.0.2b0.dist-info/top_level.txt,sha256=YwhW4mLTMMA9n-gDdsRbPRbBgpwtAXiwCTdhP5uPMuE,11
|
|
5
|
+
pynexusapi-1.0.2b0.dist-info/RECORD,,
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
pynexusapi/__init__.py,sha256=UGYz8L90YKODMODup58IheG-D09yVrcifh2OzaSHmDc,14910
|
|
2
|
-
pynexusapi-1.0b0.dist-info/METADATA,sha256=wQnpIO4fuef6lUDimxx1Kd5ZOs8Me0eAE8mkFqFszrY,909
|
|
3
|
-
pynexusapi-1.0b0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
4
|
-
pynexusapi-1.0b0.dist-info/top_level.txt,sha256=YwhW4mLTMMA9n-gDdsRbPRbBgpwtAXiwCTdhP5uPMuE,11
|
|
5
|
-
pynexusapi-1.0b0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|