astropy 5.0

Parameters

If the path set by this context manager does not already exist it will be created, if possible.

This may also be used as a decorator on a function to set the config path just within that function.

Parameters

path : str, optional

The directory (which must exist) in which to find the Astropy config files, or create them if they do not already exist. If None, this restores the config path to the user's default config path as returned by get_config_dir as though this context manager were not in effect (this is useful for testing). In this case the delete argument is always ignored.

delete : bool, optional

If True, cleans up the temporary directory after exiting the temp context (default: False).

Context manager to set a temporary path for the Astropy config, primarily for use with testing.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/config/paths.py#210
type: <class 'type'>
Commit: