        Save every command typed in a Sherpa session to a file.

script(filename="sherpa.log", clobber=False)
filename - str, optional
clobber - bool, optional

The script function saves every command typed in a Sherpa session to the file specified in the 'filename' argument; by default, the file "sherpa.log" is used. Note that this command saves only the existing history of the session - i.e., everything typed up until the script command is called - and does not log new commands.

The script function is only available to users who started the Python environment with the sherpa command.

sherpa> script()

This command will record *everything* typed at the command line in a Sherpa session to the file "sherpa.log", unless this filename already exists in the current working directory.

sherpa> script("sherpa_session1.log", clobber=True)

The commands are written to the file "sherpa_session1.log", over-writing it if it already exists.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2020