Synopsis
Save every command typed in a Sherpa session to a file.
Syntax
script(filename="sherpa.log", clobber=False) filename - str, optional clobber - bool, optional
Description
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.
Note
The script function is only available to users who started the Python environment with the sherpa command.
Examples
Example 1
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.
Example 2
sherpa> script("sherpa_session1.log", clobber=True)
The commands are written to the file "sherpa_session1.log", over-writing it if it already exists.
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- contrib
- save_chart_spectrum, save_marx_spectrum
- modeling
- save_model, save_source
- saving
- restore, save, save_all, save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table