Module irafimport
source code
module irafimport.py -- modify import mechanism
Modify module import mechanism so that
(1) 'from iraf import pkg' automatically loads the IRAF package 'pkg'
(2) 'import iraf' returns a wrapped module instance that allows minimum-match
access to task names (e.g. iraf.imhead, not just iraf.imheader)
Assumes that all IRAF tasks and packages are accessible as iraf
module attributes. Only affects imports of iraf module.
$Id: irafimport.py 1473 2011-07-13 23:12:53Z sontag $
R. White, 1999 August 17
|
|
restoreBuiltins()
Called before exiting pyraf - this puts import and reload back. |
source code
|
|
|
|
_irafImport(name,
globals={},
locals={},
fromlist=[],
level=-1) |
source code
|
|
|
|
|
|
|
_importHasLvlArg = True
|
|
|
_reloadIsBuiltin = True
|
|
|
_irafModuleProxy = <module 'pyraf.iraf' from '/usr/stsci/pyssg...
|
|
|
__package__ = 'pyraf'
|
|
|
__warningregistry__ = {('Not importing directory \'/usr/stsci/...
|
Imports:
__builtin__,
sys,
minmatch,
_originalImport,
imp,
_originalReload,
iraf
_irafModuleProxy
- Value:
<module 'pyraf.iraf' from '/usr/stsci/pyssg/2.7.stsci_python/pyraf/ira
f.pyc'>
|
|
__warningregistry__
- Value:
{('Not importing directory \'/usr/stsci/pyssg/2.7.stsci_python/pyraf/c
lcache\': missing __init__.py',
<type 'exceptions.ImportWarning'>,
81): True}
|
|