class sysinfo¶
Information about the local system.
sysinfo Details¶
-
class
cs.sysinfo¶ Information about the local system.
-
static
machine_name()¶ Get the user name of the current machine.
Return type: str
Returns: The machine name.
Raises: result.ERROR_GET_COMPUTER_NAME_FAILED(Windows) if system callGetComputerNamefailed.result.ERROR_GET_HOST_NAME_FAILED(Solaris, Linux) if system callgethostnamefailed.
>>> sysinfo.machine_name() 'mystery'
-
static
user_name()¶ Get the user name of the current user.
Return type: str
Returns: The user name.
Raises: result.ERROR_GET_USER_NAME_FAILED(Windows) if system callGetUserNamefailed,result.ERROR_GET_PW_UID_FAILED(Solaris, Linux) if system callgetpwuidfailed.
>>> sysinfo.user_name() 'alex'
-
static