形态¶
- class astropy.time.Conf[源代码]¶
-
的配置参数
astropy.table
.属性摘要
对支持的时间字符串格式使用fastcparser,包括ISO、ISOT和YearDayTime。
方法总结
items
\()迭代配置项
(name, value)
对。keys
\()reload
([attr])从配置文件重新加载配置项。
reset
([attr])将配置项重置为其默认值。
set_temp
(attr, value)临时设置一个配置值。
values
\()迭代配置项值。
属性文档
- use_fast_parser¶
对支持的时间字符串格式使用fastcparser,包括ISO、ISOT和YearDayTime。允许的值是'False'(使用Python解析器)、'True'(如果失败,使用C parser和fall through to Python parser)和'force'(如果失败,使用C解析器并引发异常)。注意选项都是字符串。
方法文件
- items()¶
迭代配置项
(name, value)
对。
- keys()¶
- reload(attr=None)¶
从配置文件重新加载配置项。
- 参数
- attr可选的STR
要重新加载的配置参数的名称。如果未提供,请重新加载所有配置参数。
- reset(attr=None)¶
将配置项重置为其默认值。
- 参数
- attr可选的STR
要重新加载的配置参数的名称。如果未提供,请重置所有配置参数。
- set_temp(attr, value)¶
临时设置一个配置值。
- 参数
- attrSTR
配置项名称
- value对象
要临时设置的值。
实例
>>> import astropy >>> with astropy.conf.set_temp('use_color', False): ... pass ... # console output will not contain color >>> # console output contains color again...
- values()¶
迭代配置项值。