Load a Py-ART configuration from a config file.

The default values for a number of Py-ART parameters and metadata is controlled by a single Python configuration file. An self-descriping example of this file can be found in the Py-ART source directory named These defaults can modified by setting the environmental variable PYART_CONFIG to point to a new configuration file. If this variable is not set then the settings contained in the file are used.

The code the configuration file is executed as-is with full permission, this may present a security issue, do not load un-trusted configuration files.

The recommended method for changing these defaults is for users to copy this file into their home directory, rename it to, make any changes, and adjust their login scripts to set the PYART_CONFIG environmental variable to point to in their home directory.

Py-ART’s configuration can also be modified within a script or shell session using this function, the modification will last until a the end of the script/session or until a new configuration is loaded.


filename (str) – Filename of configuration file. If None the default configuration file is loaded from the Py-ART source code directory.