System environment utilities. More...
Functions | |
def | hostname () |
This function returns the name of the local host. More... | |
def | timestamp () |
This function returns a string representing the current time and date in the format "YYYY-MM-DD--hh-mm-ss". More... | |
def | username () |
This function returns the name of the currently logged-in user. More... | |
System environment utilities.
This module offers system environment related utilities specific to PTS.
def pts.utils.envir.hostname | ( | ) |
This function returns the name of the local host.
def pts.utils.envir.timestamp | ( | ) |
This function returns a string representing the current time and date in the format "YYYY-MM-DD--hh-mm-ss".
This format ensures proper collation (strings sort in date/time order), is easy to read for a human user, and can be used as part of a filename on any platform (since there are no nasty characters).
def pts.utils.envir.username | ( | ) |
This function returns the name of the currently logged-in user.