ConsoleLib 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.
ConsoleLib/__init__.py ADDED
@@ -0,0 +1,34 @@
1
+ import os, sys, time
2
+ import subprocess as CMD
3
+
4
+ class Render:
5
+ @staticmethod
6
+ def DrawPic(default_char="■", points=None, width=80, height=25, clear_before_draw=False):
7
+ if clear_before_draw:
8
+ os.system("cls" if os.name == "nt" else "clear")
9
+ if points is None:
10
+ raise TypeError("Did You Forget To Write In Arguments: 'points=[POINTS_HERE]'?")
11
+ if not isinstance(points, list):
12
+ raise TypeError("Supports Only List, What In List Tuple!")
13
+ field = [[' ' for _ in range(width)] for _ in range(height)]
14
+ for item in points:
15
+ x, y, custom_char = item
16
+ if 0 <= x < width and 0 <= y < height:
17
+ field[y][x] = custom_char
18
+ for row in field:
19
+ print(''.join(row))
20
+
21
+ class ConsoleInfo:
22
+ @staticmethod
23
+ def GetConsole():
24
+ return sys.stdout
25
+
26
+ @staticmethod
27
+ def GetPipVer():
28
+ try:
29
+ result = CMD.run(['python', '-m', 'pip', '--version'], capture_output=True, text=True, check=True)
30
+ return result.stdout.strip()
31
+ except CMD.CalledProcessError as e:
32
+ return f"Error: pip not found (code {e.returncode})"
33
+ except FileNotFoundError:
34
+ return "Error: Python not installed or not in PATH"
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: ConsoleLib
3
+ Version: 0.1.0
4
+ Summary: The library for easy and best control on the Console.
5
+ Author-email: Suleiman <steal.apet@mail.ru>
6
+ License: MIT
7
+ Requires-Python: >=3.6
8
+ Description-Content-Type: text/markdown
9
+
10
+ # ConsoleLib
11
+
12
+ The library for easy and best control on the Console.
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ pip install my_lib
@@ -0,0 +1,5 @@
1
+ ConsoleLib/__init__.py,sha256=S7200GmZDJUX4NGzycgp-VFagOr3StQVU6bqPfovS2I,1284
2
+ consolelib-0.1.0.dist-info/METADATA,sha256=BEb4Mio6suEgbU_FbQ2RrZ2kM1LZau0F2j4OoOJIjpA,346
3
+ consolelib-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
4
+ consolelib-0.1.0.dist-info/top_level.txt,sha256=szwhnYuiiu0AJJtToB4dAYTCajR6oyBICRPKOJBdyTU,11
5
+ consolelib-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ ConsoleLib