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

Module irafinst

source code

module irafinst.py - Defines bare-bones functionality needed when IRAF is not present. This is NOT a replacement for any major parts of IRAF. For now, in general, we assume that IRAF exists until we are told otherwise.

Obviously, this module should refrain as much as possible from importing any IRAF related code (at least globally), since this is heavily relied upon in non-IRAF situations.

$Id: irafinst.py 1463 2011-06-24 22:58:30Z stsci_embray $

Functions [hide private]
 
cleanup()
Try to cleanup.
source code
 
tmpParFile(fname)
Create a tmp file for the given par file, and return the filename.
source code
 
_writeTmpFile(base_fname, text)
Utility function for writing our tmp files.
source code
 
getNoIrafClFor(fname, useTmpFile=False)
Generate CL file text on the fly when missing IRAF, return the full text sting.
source code
 
getIrafVer()
Return current IRAF version as a string
source code
 
getIrafVerTup()
Return current IRAF version as a tuple (ints until last item)
source code
Variables [hide private]
  NO_IRAF_PFX = '*no~iraf*/'
  EXISTS = True
  _tmp_dir = None
  __package__ = 'pyraf'

Imports: os, shutil, sys, tempfile


Function Details [hide private]

cleanup()

source code 

Try to cleanup. Don't complain if the dir isn't there.

_writeTmpFile(base_fname, text)

source code 

Utility function for writing our tmp files. Return the full fname.

getNoIrafClFor(fname, useTmpFile=False)

source code 

Generate CL file text on the fly when missing IRAF, return the full text sting. If useTmpFile, then returns the temp file name.