Bases: astropy.config.ConfigItem
This is a backward compatibility layer for configuration items that moved to ScienceState classes in astropy 0.4.
| Parameters: | since : str
python_name : str
config_name : str
science_state : ScienceState subclass
cfgtype : str or None, optional
module : str, optional
|
|---|
Methods Summary
| __call__() | Returns the value of this ConfigItem |
| reload() | Reloads the value of this ConfigItem from the relevant configuration file. |
| set(value) | Sets the current value of this ConfigItem. |
| set_temp(*args, **kwds) | Sets this item to a specified value only inside a with block. |
Methods Documentation
Returns the value of this ConfigItem
| Returns: | val
|
|---|---|
| Raises: | TypeError
|
Reloads the value of this ConfigItem from the relevant configuration file.
| Returns: | val
|
|---|
Sets the current value of this ConfigItem.
This also updates the comments that give the description and type information.
| Parameters: | value
|
|---|---|
| Raises: | TypeError
|
Sets this item to a specified value only inside a with block.
Use as:
ITEM = ConfigItem('ITEM', 'default', 'description')
with ITEM.set_temp('newval'):
#... do something that wants ITEM's value to be 'newval' ...
print(ITEM)
# ITEM is now 'default' after the with block
| Parameters: | value
|
|---|