#! /usr/local/Python-2.0/bin/python2.0 -i #Generated automatically from pyraf.in by configure. """ Usage: pyraf [options] [savefile] where savefile is an optional save file to start from and options are one or more of: -s Silent initialization (does not print startup messages) -n No splash screen during startup -v Set verbosity level (may be repeated to increase verbosity) -m Run command line wrapper to provide extra capabilities (default) -i Do not run command line wrapper, just run standard Python front end -h Print this message Long versions of options: -s --silent -n --nosplash -v --verbose -m --commandwrapper=yes -i --commandwrapper=no -h --help """ # $Id$ # # R. White, 2000 January 21 import sys, os # set search path to include directory above this script and current directory # ... but do not want the pyraf package directory itself in the path, since # that messes things up by allowing direct imports of pyraf submodules # (bypassing the __init__ mechanism.) # follow links to get to the real executable filename executable = sys.argv[0] while os.path.islink(executable): executable = os.readlink(executable) pyrafDir = os.path.dirname(executable) del executable try: sys.path.remove(pyrafDir) except ValueError: pass absPyrafDir = os.path.abspath(os.path.join(pyrafDir,'..')) if absPyrafDir not in sys.path: sys.path.insert(0, absPyrafDir) del absPyrafDir, pyrafDir if "." not in sys.path: sys.path.insert(0, ".") # read the user's startup file (if there is one) if os.environ.has_key("PYTHONSTARTUP") and \ os.path.isfile(os.environ["PYTHONSTARTUP"]): execfile(os.environ["PYTHONSTARTUP"]) from pyraf import doCmdline, iraf, __version__ from pyraf.irafpar import makeIrafPar from pyraf.irafglobals import yes, no, INDEF, EOF logout = quit = exit = 'Use ".exit" to exit' print "PyRAF", __version__, "Copyright (c) 2002 AURA" # just print first line of Python copyright (long in v2.0) print "Python", sys.version.split()[0], sys.copyright.split('\n')[0] if doCmdline: del doCmdline # Start up command line wrapper keeping definitions in main name space # Keep the command-line object in namespace too for access to history import pyraf.pycmdline _pycmdline = pyraf.pycmdline.PyCmdLine(locals=globals()) _pycmdline.start() else: del doCmdline