eric7.SystemUtilities.OSUtilities

Module implementing Operating System related utility functions.

Global Attributes

None

Classes

None

Functions

getEnvironmentEntry Module function to get an environment entry.
getHomeDir Function to get a users home directory.
getRealName Function to get the real name of the user.
getUserName Function to get the user name.
hasEnvironmentEntry Module function to check, if the environment contains an entry.
isLinuxPlatform Function to check, if this is a Linux platform.
isMacPlatform Function to check, if this is a Mac platform.
isWindowsPlatform Function to check, if this is a Windows platform.
win32_GetUserName Function to get the user name under Win32.
win32_Kill Function to provide an os.kill equivalent for Win32.
win32_getRealName Function to get the user's real name (aka.


getEnvironmentEntry

getEnvironmentEntry(key, default=None)

Module function to get an environment entry.

key
key of the requested environment entry (string)
default
value to be returned, if the environment doesn't contain the requested entry (string)
Return:
the requested entry or the default value, if the entry wasn't found (string or None)
Up


getHomeDir

getHomeDir()

Function to get a users home directory.

Return:
home directory (string)
Up


getRealName

getRealName()

Function to get the real name of the user.

Return:
real name of the user (string)
Up


getUserName

getUserName()

Function to get the user name.

Return:
user name (string)
Up


hasEnvironmentEntry

hasEnvironmentEntry(key)

Module function to check, if the environment contains an entry.

key (str)
key of the requested environment entry
Return:
flag indicating the presence of the requested entry
Return Type:
bool
Up


isLinuxPlatform

isLinuxPlatform()

Function to check, if this is a Linux platform.

Return:
flag indicating Linux platform
Return Type:
bool
Up


isMacPlatform

isMacPlatform()

Function to check, if this is a Mac platform.

Return:
flag indicating Mac platform
Return Type:
bool
Up


isWindowsPlatform

isWindowsPlatform()

Function to check, if this is a Windows platform.

Return:
flag indicating Windows platform
Return Type:
bool
Up


win32_GetUserName

win32_GetUserName()

Function to get the user name under Win32.

Return:
user name (string)
Up


win32_Kill

win32_Kill(pid)

Function to provide an os.kill equivalent for Win32.

pid
process id (integer)
Return:
result of the kill (boolean)
Up


win32_getRealName

win32_getRealName()

Function to get the user's real name (aka. display name) under Win32.

Return:
real name of the current user (string)
Up