OOF2: The Manual

Name

OOF.File.Save.Python_Log — Save the current session as a Python script.

Synopsis

OOF.File.Save.Python_Log(filename)

Details

  • Parent Menu: OOF.File.Save
  • Callback: function saveLog in module oof2.common.IO.mainmenu
  • Threadability: Threadable
  • Options: no_log=1
  • Parameters:

    filename
    Name of the file. Type: A character string.

Description

At any point in an OOF2 session, one can save a log file of all of the commands that have been executed. The file is a Python script. Subsequently loading the file with OOF.File.Load.Script or with the --script command line argument will recreate the OOF2 session.

[Note] Note

Loading a saved script may not exactly reproduce an OOF2 session if the script contains commands that use the random number generator, such as many of the Skeleton modification methods. The randomness of the random number generator can be made predictable (on a given computer) by always using the --seed command line argument, but of course then the numbers aren't truly random.

[Note] Note

Saving and reloading a log file is an inefficient way of restoring an OOF2 session, because each command is re-executed when the file is loaded. It is more efficient to use the other commands in the OOF.File.Save menu to save the objects (Microstructures, Skeletons, and Meshes) that OOF2 creates.


/* OOF home */ /* OOF2 home */ /* Send mail to the OOF Team */