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

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

Detailed Description

System environment utilities.

This module offers system environment related utilities specific to PTS.

Function Documentation

◆ hostname()

def pts.utils.envir.hostname ( )

This function returns the name of the local host.

◆ timestamp()

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

◆ username()

def pts.utils.envir.username ( )

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