From 1c71872ca7f5a412dc90495d177bdc6bac7d3815 Mon Sep 17 00:00:00 2001 From: SirDank <52797753+SirDank@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:34:52 +0530 Subject: [PATCH] 3.6.4 --- README.md | 74 ++++++++++++++++++++++++++++++++++++-------- dankware/__init__.py | 8 ++--- dankware/ctypes.py | 5 ++- setup.py | 2 +- 4 files changed, 68 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f824136..661b6a4 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,25 @@
# 🚨 dankware 🚨 + Python module with various features! Install with the below command! -``` + +```bash pip install dankware ``` -Update to the latest version with the below command! +```bash +pip install dankware[extras] ``` + +Update to the latest version with the below command! + +```bash pip install --upgrade dankware ``` - + # 🚨 Multithreading 🚨 + ```py from dankware import multithread import time @@ -36,6 +44,7 @@ def example(): multithread(example, 10) # func: example | threads: 10 | single: 50 seconds | multi: 5 seconds ``` ++
--- @@ -103,10 +115,11 @@ registry_path = r'Software\Google\Chrome\PreferenceMACs' export_registry_keys(registry_root, registry_path, recursive=True, export_path=export_path) ``` +
+
--- @@ -142,10 +155,11 @@ except: print(clr(err(sys.exc_info()),2)) try: value = 1/0 except: print(clr(err(sys.exc_info(),"mini"),2)) ``` +
+
--- @@ -156,6 +170,7 @@ from dankware import github_downloads # full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latest for url in github_downloads("EssentialsX/Essentials"): print(url) ``` +
+
--- @@ -175,9 +191,10 @@ for url in github_file_selector("EssentialsX/Essentials", "remove", ('AntiBuild' from dankware import random_ip print(random_ip()) ``` +
+
--- @@ -209,9 +226,10 @@ for location in locations: path = get_path(location) print(path) ``` +
+
--- @@ -225,6 +243,7 @@ from dankware import clr print(clr("\n > Hey! Long time no see :)")) #print(clr("\n > Hey! Long time no see :)", colour_one = white_bright, colour_two = red_bright)) ``` +
+
--- @@ -293,28 +318,34 @@ Y88b 888 888 888 888 888 888 "88b Y88b 888 d88P 888 888 888 Y8b. ``` ## ♦️ Colourize Banner (random) ♦️ + ```py from dankware import clr # preset = 4 print(clr(banner,4)) ``` +
+
--- @@ -341,95 +372,112 @@ Y8b d88P ``` ## ♦️ Black To White ♦️ + ```py print(fade(banner, "black2white")) print(fade(banner, "black2white-v")) ``` +
## ♦️ Yellow To Red ♦️ + ```py print(fade(banner, "yellow2red")) print(fade(banner, "yellow2red-v")) ``` +
## ♦️ Green To Yellow ♦️ + ```py print(fade(banner, "green2yellow")) print(fade(banner, "green2yellow-v")) ``` +
## ♦️ Green To Cyan ♦️ + ```py print(fade(banner, "green2cyan")) print(fade(banner, "green2cyan-v")) ``` +
## ♦️ Blue To Cyan ♦️ + ```py print(fade(banner, "blue2cyan")) print(fade(banner, "blue2cyan-v")) ``` +
## ♦️ Blue To Pink ♦️ + ```py print(fade(banner, "blue2pink")) print(fade(banner, "blue2pink-v")) ``` +
## ♦️ Pink To Red ♦️ + ```py print(fade(banner, "pink2red")) print(fade(banner, "pink2red-v")) ``` +
## ♦️ Random ♦️ + ```py print(fade(banner, "random")) ``` +
-
+
--- # 🚨 Also check out 🚨 + -
+
--- diff --git a/dankware/__init__.py b/dankware/__init__.py index e43dbac..ab83fb4 100644 --- a/dankware/__init__.py +++ b/dankware/__init__.py @@ -93,11 +93,11 @@ white_dim = '' yellow_dim = '' -from .text import clr, align, fade, random_ip -from .terminal import cls, title, rm_line, sys_open -from .multithread import multithread +from .text import clr, align, fade, random_ip # pylint: disable=wrong-import-position # noqa: E402 +from .terminal import cls, title, rm_line, sys_open # pylint: disable=wrong-import-position # noqa: E402 +from .multithread import multithread # pylint: disable=wrong-import-position # noqa: E402 #from .pillow import splash_screen -from .winreg import get_path +from .winreg import get_path # pylint: disable=wrong-import-position # noqa: E402 if os.name == 'nt': from .winreg import export_registry_keys diff --git a/dankware/ctypes.py b/dankware/ctypes.py index 5189dad..119cad1 100644 --- a/dankware/ctypes.py +++ b/dankware/ctypes.py @@ -4,8 +4,6 @@ if os.name == 'nt': import ctypes -elif os.name == 'posix': - import pwd # pylint: disable=import-error def is_admin() -> bool: @@ -17,7 +15,8 @@ def is_admin() -> bool: try: return ctypes.windll.shell32.IsUserAnAdmin() except: return False elif os.name == 'posix': - return pwd.getpwuid(os.getuid())[0] in ('root', '0') # pylint: disable=no-member + from pwd import getpwuid # pylint: disable=import-error, import-outside-toplevel + return getpwuid(os.getuid())[0] in ('root', '0') # pylint: disable=no-member else: raise ValueError(f"Unsupported Operating System: {os.name} | Supported: 'nt', 'posix'") diff --git a/setup.py b/setup.py index 56a832a..d1f6486 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ license = "MIT", name = "dankware", - version = "3.6.3", + version = "3.6.4", author = "SirDank", author_email = "SirDankenstein@protonmail.com",