Package pyraf :: Module iraftask :: Class IrafPkg
[hide private]
[frames] | no frames]

Class IrafPkg

source code


IRAF package class (special case of IRAF task)

Instance Methods [hide private]
 
__init__(self, prefix, name, suffix, filename, pkgname, pkgbinary) source code
 
isLoaded(self)
Returns true if this package has already been loaded
source code
 
addTask(self, task, fullname)
Add a task to the task list for this package
source code
 
getAllMatches(self, name, triedpkgs=None)
Return list of names of all parameters/tasks that may match name
source code
 
unlearn(self)
Resets parameters for all tasks in the package to their default values
source code
 
__getattr__(self, name)
Return the task or param 'name' from this package (if it exists).
source code
 
_getTaskFullname(self, name, triedpkgs=None)
Return the full name (pkg.task) of task 'name' from this package
source code
 
_specialKW(self, kw)
Handle special _doprint, _hush keywords
source code
 
_run(self, redirKW, specialKW)
Execute task after parameters, I/O redirection are prepared.
source code

Inherited from IrafCLTask: __getstate__, getCode, initTask, reCompile

Inherited from IrafTask: __call__, __repr__, __setattr__, __str__, addPkgbinary, dParam, eParam, getDefaultParList, getFilename, getForeign, getFullpath, getMode, getName, getParDict, getParList, getParObject, getParam, getParpath, getPkgbinary, getPkgname, getTbflag, hasParfile, isConsistent, isHidden, is_pseudo, lParam, run, saveParList, scrunchName, setHidden, setParList, setParam, tParam

Inherited from stsci.tools.taskpars.TaskPars: canPerformValidation, getHelpAsString, knowAsNative

Method Details [hide private]

__init__(self, prefix, name, suffix, filename, pkgname, pkgbinary)
(Constructor)

source code 
Overrides: IrafTask.__init__

addTask(self, task, fullname)

source code 

Add a task to the task list for this package

Just store the name of the task to avoid cycles

getAllMatches(self, name, triedpkgs=None)

source code 

Return list of names of all parameters/tasks that may match name

Overrides: IrafTask.getAllMatches

unlearn(self)

source code 

Resets parameters for all tasks in the package to their default values

Overrides: IrafTask.unlearn

__getattr__(self, name)
(Qualification operator)

source code 

Return the task or param 'name' from this package (if it exists).

Overrides: IrafTask.__getattr__

_getTaskFullname(self, name, triedpkgs=None)

source code 

Return the full name (pkg.task) of task 'name' from this package

Returns None if task is not found.

Also searches subpackages for the task. triedpkgs is a dictionary with all the packages that have already been tried. It is used to avoid infinite recursion when packages contain themselves.

Tasks that are found are added to _tasks dictionary to speed repeated searches.

_specialKW(self, kw)

source code 

Handle special _doprint, _hush keywords

Overrides: IrafTask._specialKW

_run(self, redirKW, specialKW)

source code 

Execute task after parameters, I/O redirection are prepared.

Overrides: IrafTask._run