Logging commands
rohit wrote on Mar 23, 2009
I would like to know if there a way in IRAF to keep a log of what's been typed or executed. For example, in IDL or gnuplot one can ask the program to create a log file for the session. Anything that is typed or executed is logged. This is particularly helpful for students learning a program. They can simply look at the log files and learn the commands/tasks, tricks used in the class.
Thank you,
Thank you,
Mike Fitzpatrick wrote on Mar 23, 2009
The CL has two parameters to control this, cl.keeplog to turn logging on/off and cl.logfile to specify the logging file to be kept. You can also just type "history" and dump the output to a file for editing.
There is also a mode in which you can create playback scripts of commands, useful for creating tutorials. For example
To play this back later, use
The 'nlines' param sets the number of lines in the terminal, the 'verify' toggle says whether to wait for a <cr> after each command. The file that's created is plain text so you can edit it to put in sleeps, print comments, etc. Note that this doesn't work with the default ECL, you'll need to start IRAF with "cl -old" to use the old CL to have a working playback mode.
-Mike
There is also a mode in which you can create playback scripts of commands, useful for creating tutorials. For example
cl> stty login=logfile.dat
cl> .....type some commands
cl> stty logout # turn on keystroke logging
To play this back later, use
cl> stty (playback="logfile.dat", nlines=24, verify=no)The 'nlines' param sets the number of lines in the terminal, the 'verify' toggle says whether to wait for a <cr> after each command. The file that's created is plain text so you can edit it to put in sleeps, print comments, etc. Note that this doesn't work with the default ECL, you'll need to start IRAF with "cl -old" to use the old CL to have a working playback mode.
-Mike
rohit wrote on Mar 23, 2009
Thanks for the detailed reply! This is very helpful especially for tutorials!
Last post on Mar 23, 2009