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.
isFreeBsdPlatform Function to check, if this is a BSD (FreeBSD) platform.
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 (str)
key of the requested environment entry
default (str)
value to be returned, if the environment doesn't contain the requested entry
Return:
the requested entry or the default value, if the entry wasn't found
Return Type:
str
Up


getHomeDir

getHomeDir()

Function to get a users home directory.

Return:
home directory
Return Type:
str
Up


getRealName

getRealName()

Function to get the real name of the user.

Return:
real name of the user
Return Type:
str
Up


getUserName

getUserName()

Function to get the user name.

Return:
user name
Return Type:
str
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


isFreeBsdPlatform

isFreeBsdPlatform()

Function to check, if this is a BSD (FreeBSD) platform.

Return:
flag indicating BSD platform
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
Return Type:
str
Up


win32_Kill

win32_Kill(pid)

Function to provide an os.kill equivalent for Win32.

pid (int)
process id
Return:
result of the kill
Return Type:
bool
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
Return Type:
str
Up