PyCFUtils (Cristi Fati's Utils for Python (&& more)) - a collection of (cool) scripts / utilities
Project description
PyCFUtils
PyCFUtils (Cristi Fati's Utils for Python (&& more)) - a collection of goodies ((cool) scripts / utilities)
Install
Use PIP:
python -m pip install --upgrade pycfutils
Usage example
import pycfutils.io
import pycfutils.miscellaneous as misc
import pycfutils.network
import pycfutils.system
from pycfutils.exceptions import NetworkException
print("Press a key in less than one second...")
print(pycfutils.io.read_key(timeout=1))
print(misc.timestamp_string(human_readable=True))
try:
print(pycfutils.network.connect_to_server("127.0.0.1", 22))
except NetworkException as e:
print(e)
pycfutils.system.cpu_stress(3)
# --- Windows only ---
import pycfutils.gui
print(pycfutils.gui.message_box("Title", "Text to display", x=320, y=200))
# --- Requires PyGObject (also might take some time to complete) ---
from pycfutils.gstreamer import RegistryAccess
ra = RegistryAccess()
print(ra.element_classes())
Also, there are some useful (CLI wrapper) scripts in the tools folder.
-
Nix:
for script in $(find "pycfutils/tools" -maxdepth 1 -type f); do python "${script}" -h; done
-
Win:
for /f %g in ('dir /b /a-d /a-l "pycfutils\tools\*.py"') do (python "pycfutils\tools\%g" -h)
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
pycfutils-2024.5.27.tar.gz
(23.4 kB
view hashes)
Built Distributions
Close
Hashes for pycfutils-2024.5.27-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a704f86c7d304541757ad8add756df349caf8b8b7a47f267a2af70df03089f |
|
MD5 | 3ea3e101cafed5aeb2e7cf18ee589574 |
|
BLAKE2b-256 | fbe261cbfe6c1d7fe0c66e82aaea2c4848e956f344fc99e68acd9ff4ad2cdb1e |
Close
Hashes for pycfutils-2024.5.27-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 864575079d6e4b97789de6850fa24e5503a64afea7da158860ecaf2ba6c67493 |
|
MD5 | cef5201933a7decf7bdcab429c88f09b |
|
BLAKE2b-256 | 49cfc281c43abecf51266ae0913ea1451a8665b183e51b12ce5fd819c8c89b75 |
Close
Hashes for pycfutils-2024.5.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54e4ff56e92199d0dba1d6c8e806255fcd8507d25b7f521d6d1a8a574fd0e420 |
|
MD5 | 58f8bdc42e448f6d0f05ea9557d73b1a |
|
BLAKE2b-256 | 180ae5aa96915aafc0067267fd7157aa0ac7d2ab380a3a85f5606508032b1597 |