Python library simplifying system script management with handy functions like clearing the console, setting the window title, and detecting the operating system (Windows, Linux, macOS).
Project description
contsys
Python library simplifying system script management with handy functions like clearing the console, setting the window title, and detecting the operating system (Windows, Linux, macOS).
By G-Azon 🇫🇷
Features
-
Cmd:
Cmd.clearclears the console screen.Cmd.title([TITLE])changes the title of the console screen to the specified title.
-
System:
System.iswin32()returns True if the current OS is Windows, and return False if the current OS is not Windows.System.linux()returns True if the current OS is Linux Based, and return False if the current OS is not Linux Based.System.isdarwin()returns True if the current OS is MacOS, and return False if the current OS is not MacOS.System.isadmin()returns True if the script is executed as root, and returns False if the script is not executed as root.System.runasadmin([TARGET], [ARGS])run the specified python script as root.
Installation
You can install contsys using pip:
pip install contsys
License
This project is under the MIT License.
Contact
If you have any trouble or you want to suggest an improvement you can contact me at G-Azon782345@protonmail.com
Changelog
-
1.3.1
- Fixed
Cmd.title()on Linux OS
- Fixed
-
1.3.0
- Removed
monitor.cpu_usage()&monitor.ram_usage()
- Removed
-
1.2.4
- Fixed
monitor.cpu_usage()&monitor.ram_usage()
- Fixed
-
1.2.3
- Changed
monitor.cpu_usage()&monitor.ram_usage(): they now return the percentage as a number, without the percent symbol.
- Changed
-
1.2.2
- Added version the 1.2.1 in the changelog. (i forgotten it)
- Improved the changelog by bolding change types.
- Fixed an issue where the SSH indicator was still displayed even when
ssh_indicatorwas not specified and the program was not running over an SSH connection.
-
1.2.1
- Added an option to
CMD.title(): it now displays an indicator if the program is running over an SSH connection. This can be disabled by settingssh_indicator = False.
- Added an option to
-
1.2.0
- Added
system.isadmin()system.runasadmin()
- Added
-
1.1.3
- Added the MIT license in LICENSE
-
1.1.2
- Small improvements in the description in the Changelog section
-
1.1.1
- Added
monitor.cpu_usage()monitor.ram_usage(). - Added the changelog section.
- Added a new required dependency: psutil
- Added
-
1.0.2
- Added a better description.
-
1.0.1
- Added
system.iswin32()system.islinux()system.isdarwin().
- Added
-
1.0.0
- The first version of contsys.
- Added
CMD.clear()CMD.title().
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contsys-1.3.1.tar.gz.
File metadata
- Download URL: contsys-1.3.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb0f65e7580830f85ad5b32e014afb2ee066bd94613b66b16b864edbbf14531
|
|
| MD5 |
e33b4ba17c8396a3d412a055e8a99c43
|
|
| BLAKE2b-256 |
3d5c441cebb3c8110517325654b2915aead477a68cc55363dbf2f07f69def8b6
|
File details
Details for the file contsys-1.3.1-py3-none-any.whl.
File metadata
- Download URL: contsys-1.3.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd621a99c6baecaefeab08d2eed85a64c1b6c4394386116291198deb2b4821e1
|
|
| MD5 |
aff8f4a33f18c78db0b6aee11b3714f8
|
|
| BLAKE2b-256 |
868d8a22ad329192f448756e60c370d01f71b29e6e00ec96a56cbaa1c4f9ecc8
|