<source lang="python">
# Python module imports.
import os, os.path, stat
# relax module imports.
# Open the file for writing.
file_name = "grace2images.py"
write_results_dir_grace = write_results_dir + os.sep + 'final' + os.sep + 'grace'file_path = lib.io.get_file_path(file_name, write_results_dirwrite_results_dir_grace)
file = lib.io.open_write_file(file_path, force=True)
# Write the file.