The SKIRT project
advanced radiative transfer for astrophysics
pts.utils.envir Namespace Reference

System environment utilities. More...

Functions

 hostname ()
 This function returns the name of the local host.
 timestamp ()
 This function returns a string representing the current time and date in the format "YYYY-MM-DD--hh-mm-ss".
 username ()
 This function returns the name of the currently logged-in user.

Detailed Description

System environment utilities.

This module offers system environment related utilities specific to PTS.

Function Documentation

◆ hostname()

pts.utils.envir.hostname ( )

This function returns the name of the local host.

◆ timestamp()

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).

◆ username()

pts.utils.envir.username ( )

This function returns the name of the currently logged-in user.