Some utilities made with the standard library - Windows only
Tested against Windows / Python 3.11 / Anaconda
from nodepsutils import (
get_tmpfile_with_remove,
prettify_csv,
startfile_wait,
get_dev_dict,
get_ip_of_this_pc,
get_short_path_name,
get_short_path_name_cached,
send_ctrlc_to_process,
get_information_from_all_procs_with_connections_and_open_files,
get_pids_with_open_file,
get_information_from_all_procs_with_connections,
get_information_from_all_procs,
get_tmpfile,
kill_process,
kill_processes_with_executable,
set_read_write,
set_read_only,
start_detached_process,
get_free_port,
disable_internet_for_app,
enable_internet_for_app,
touch,
)
tmpfile1,removefunction=get_tmpfile_with_remove(suffix=".csv")
print(tmpfile1)
print(removefunction)
tmpfile2=get_tmpfile()
print(tmpfile2)
prettyfile = prettify_csv(r"C:\Users\hansc\Downloads\titanic2.csv")
print(prettyfile)
startfile_wait(r"C:\Users\hansc\Downloads\titanic2.csv")
# network devices
devi=get_dev_dict()
print(devi)
# ips
myip=get_ip_of_this_pc()
myipwithproxy = get_ip_of_this_pc(
proxy={
"https": f"socks5://{myip}:50688",
"http": f"socks5://{myip}:50688",
}
)
print(myip)
print(myipwithproxy)
# get short path
shortpath=get_short_path_name(
long_name=r"C:\Users\hansc\Downloads\_1a063db4-b3b7-4bb2-84f5-cc6c9a21b9a8.jfif"
)
print(shortpath)
shortpathcached = get_short_path_name_cached(
long_name=r"C:\Users\hansc\Downloads\_1a063db4-b3b7-4bb2-84f5-cc6c9a21b9a8.jfif"
)
print(shortpathcached)
# ctrl+c
send_ctrlc_to_process(pid=5342)
# process information
p1=get_information_from_all_procs()
p2=get_information_from_all_procs_with_connections()
p3=get_information_from_all_procs_with_connections_and_open_files()
p4 = get_pids_with_open_file(file=r"C:\Users\hansc\Downloads\todasasmusicax.xlsx")
# killing a process, first gracefully, than forcefully
for v in p4:
kill_process(pid=(v["ProcessId"]), sleep_between_exitcommands=1)
# killing a process, first gracefully, than forcefully
kill_processes_with_executable(
path=r"C:\WINDOWS\system32\notepad.exe", sleep_between_exitcommands=1
)
# change rights of file
path = r"C:\Users\hansc\Downloads\titanic2.csv"
set_read_write(path)
set_read_only(path)
# start completely detached process (won't close when python closes)
processdata=start_detached_process(
command=[r"C:\Program Files\BlueStacks_nxt\HD-Player.exe", "--instance", "Rvc64_7"],
working_dir=r"C:\ProgramData\BlueStacks_nxt\Engine\Rvc64_7",
convert_exe_to_83=True,
convert_all_to_83=False,
accept_already_running=True,
use_cached_shortpath=True,
timeout_get_new_process_data=5,
get_proc_information=True,
)
print(processdata)
# free port with certain length
get_free_port(minlen=5)
# disable internet
disable_internet_for_app(exefile=r"C:\Program Files\BlueStacks_nxt\HD-Player.exe")
enable_internet_for_app(exefile=r"C:\Program Files\BlueStacks_nxt\HD-Player.exe",disable_firewall=False)
#create a file
touch('c:\\some\\not\\existing\\file.txt')
Metadata
Release files for nodepsutils 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nodepsutils-0.10.tar.gz | 12.9 kB | Without provenance | Details for nodepsutils-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nodepsutils-0.10-py3-none-any.whl | Python 3 | none | any | Details for nodepsutils-0.10-py3-none-any.whl |
Total release size: 26.1 kB
Release files / nodepsutils-0.10.tar.gz
| Download URL | nodepsutils-0.10.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
970a1678149363f9af1d2cd5243f4f17982d1c2efc91b61c7107eefeebbde023
|
|
BLAKE2b-256 checksum How to use checksums |
c22063c6b6fa56e7f1e8a175ef1fbfa3b19e31dbc02cc8d5c6391df4b5971715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / nodepsutils-0.10-py3-none-any.whl
| Download URL | nodepsutils-0.10-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e68d83ad60e8ef94f2ff2a50fdeab57cf989be720c4087845a051785f6e7fd5d
|
|
BLAKE2b-256 checksum How to use checksums |
238e2d3c43b3d25ea79f5e8630ad29de59dfa23fdca4ab4745c2b13cf01f6bc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for nodepsutils 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.