The SKIRT project
advanced radiative transfer for astrophysics
Functions | Variables
pts.utils.config Namespace Reference

Configuration utilities. More...

Functions

def interactive (mode=None)
 If the mode argument is omitted or has a value of None, this function returns the current interactive mode (as set by the most recent call to the setInteractive() function). More...
 
def setInteractive (mode)
 This function sets the PTS interactive mode to the specified mode value (i.e. True or False). More...
 

Variables

bool _interactive
 This global variable is set by the setInteractive() function in this module, which is typically invoked during initialization of PTS. More...
 

Detailed Description

Configuration utilities.

This module offers utilities related to the current configuration of PTS.

Function Documentation

◆ interactive()

def pts.utils.config.interactive (   mode = None)

If the mode argument is omitted or has a value of None, this function returns the current interactive mode (as set by the most recent call to the setInteractive() function).

If the mode argument is specified and has value other than None, its value is returned (after conversion to bool).

◆ setInteractive()

def pts.utils.config.setInteractive (   mode)

This function sets the PTS interactive mode to the specified mode value (i.e. True or False).

Variable Documentation

◆ _interactive

bool pts.utils.config._interactive
private

This global variable is set by the setInteractive() function in this module, which is typically invoked during initialization of PTS.

A value of true means that PTS operates in interactive mode, where a user expects, for example, visualization to occur in a window or a notebook cell rather than being saved to a file.