# 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

class irfpy.util.pyanarc.RcFile(name=None, deprecatedwarn=True)[source]

Bases: object

Class treating individual configure file.

Class treating individual configure file. From v1.8, the use of RcFile explicitly is not recommended, instead, Rc class is recommended. Rc handles 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)>
get(subproject, parameter)[source]

Get a value of the specified parameter of particular subproject.

class irfpy.util.pyanarc.Rc(verbose=False)[source]

(Deprecated) Handles configuration files for pyana projects.

Warning

Use irfpy.util.irfpyrc.Rc class. This class is kept just for compatibility for existing codes.

Parameters
• load_default – Load default files. If False, no files are loaded. You may use append() method to load manually.