irfpy.util.pyanarc¶
Configure file support for irfpy library.
Code author: Yoshifumi Futaana
Warning
This module (irfpy.util.pyanarc) is deprecated.
Use the compatible module irfpy.util.irfpyrc.
Configure file is used to make programs portable. For example, consider the case you want to access a local folder, where important data file locates. The location of the folder can differ computer by computer. Thus, the location is not recommended to be hard-coded into any program. In such case, by preparing a configure file computer by computer, and specify the path name in the file.
See more detailed example in How to use configuration files.
History
From v4.0.2, this module (
irfpy.util.pyanarc) is deprecated. Use the compatible moduleirfpy.util.irfpyrc.From v1.8, using
irfpy.util.pyanarc.RcFileis not recommended. Useirfpy.util.pyanarc.Rcclass instead.
- class irfpy.util.pyanarc.RcFile(name=None, deprecatedwarn=True)[source]¶
Bases:
objectClass treating individual configure file.
Class treating individual configure file. From v1.8, the use of RcFile explicitly is not recommended, instead,
Rcclass is recommended.Rchandles multiple configure file at once.Open a configure file.
- Parameters:
name – Name of the RC file. Default is ${HOME}/.pyanarc
- logger = <Logger irfpy.util.pyanarc.RcFile (DEBUG)>¶
- class irfpy.util.pyanarc.Rc(verbose=False)[source]¶
Bases:
Rc(Deprecated) Handles configuration files for pyana projects.
Warning
Use
irfpy.util.irfpyrc.Rcclass. This class is kept just for compatibility for existing codes.- Parameters:
raises – Raises exception if the entry is not found.
load_default – Load default files. If False, no files are loaded. You may use
append()method to load manually.
- property rcfilename¶