Package pyraf :: Module irafglobals
[hide private]
[frames] | no frames]

Module irafglobals

source code

module irafglobals.py -- widely used IRAF constants and objects

yes, no         Boolean values
IrafError       Standard IRAF exception
Verbose         Flag indicating verbosity level
pyrafDir        Directory with these Pyraf programs
userIrafHome    User's IRAF home directory (./ or ~/iraf/)
userWorkingHome User's working home directory (the directory
                when this module gets imported.)
EOF             End-of-file indicator object
INDEF           Undefined object
IrafTask        "Tag" class for IrafTask type.
IrafPkg         "Tag" class for IrafPkg type

This is defined so it is safe to say 'from irafglobals import *'

The tag classes do nothing except allow checks of types via (e.g.)
isinstance(o,IrafTask).  Including it here decouples the other classes
from the module that actually implements IrafTask, greatly reducing the
need for mutual imports of modules by one another.

$Id: irafglobals.py 784 2007-04-05 14:16:52Z rij $

R. White, 2000 January 5

Classes [hide private]
  IrafError
  _VerboseClass
Container class for verbosity (or other) value
  _Boolean
Class of boolean constant object
  _EOFClass
Class of singleton EOF (end-of-file) object
  _INDEFClass
Class of singleton INDEF (undefined) object
  _INDEFClass_int
  _INDEFClass_float
  _EPSILONClass
Class of singleton EPSILON object, for floating-point comparison
  IrafTask
  IrafPkg
Variables [hide private]
  _os = os
  _sys = sys
  _use_ecl = _os.environ.get("PYRAF_USE_ECL", False)
  Verbose = _VerboseClass()
  userWorkingHome = _os.getcwd()
  pyrafDir = _os.path.normpath(_os.path.join(userWorkingHome, py...
  userIrafHome = _os.path.join(userWorkingHome, '')
  yes = _Boolean(1)
  no = _Boolean(0)
  EOF = _EOFClass()
  INDEF = _INDEFClass()
  _INDEF_int = _INDEFClass_int()
  _INDEF_float = _INDEFClass_float()
  epsilon = _EPSILONClass()
Variables Details [hide private]

pyrafDir

Value:
_os.path.normpath(_os.path.join(userWorkingHome, pyrafDir))