Configure file support for irfpy library.

Code author: Yoshifumi Futaana


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.


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.


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]

Bases: irfpy.util.irfpyrc.Rc

(Deprecated) Handles configuration files for pyana projects.


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

  • 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