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

Configuration utilities. More...

Functions

 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).
 setInteractive (mode)
 This function sets the PTS interactive mode to the specified mode value (i.e. True or False).

Variables

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

Detailed Description

Configuration utilities.

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

Function Documentation

◆ interactive()

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

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
protected

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.