mltk.utils.system¶
General system utilities
See the source code on Github: mltk/utils/system.py
Functions
Return the current OS handle, windows, linux or osx |
|
Return the current username (which is assumed to be the directory name of the HOME directory) |
|
Return if the script has admin permissions |
|
|
Return if the script is running on Linux |
|
Return if the script is running on OSX |
Return if the script is running on Windows |
|
|
Set the executable permissions of the given executable path |
|
Raise a termination signal and kill the current script |
|
Send a signal to the current process and all children processes |
- get_username()[source]¶
Return the current username (which is assumed to be the directory name of the HOME directory)
- Return type:
str
- make_path_executable(path)[source]¶
Set the executable permissions of the given executable path
- Parameters:
path (str) –
- send_signal(sig=Signals.SIGINT, pid=None)[source]¶
Send a signal to the current process and all children processes
- Parameters:
sig – The signal to send
pid (
int
) – The process id. If None then use current process. If -1, only send signal to children processes of current process If 0, only send signal to current process