You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can imagine some situations where a script designer might not want to print the script execution summary at the end of the script (e.g., perhaps it's just far too long), but it would still be beneficial to have that information on hand after the script completes. I think it'd be worthwhile, therefore, to allow for that summary to be saved to disk somehow.
Possible Implementation
We could create a save_script_execution_summary() that perhaps calls print_script_execution_summary() under the hood, but with a different rich.console.Console, and then save that console's text to a file. Or maybe we want to extend the behavior of the print_ method to allow it to also save to a file if a flag is provided. Then maybe we're talking about adding flags to the parser to specify that the summary is going to the console, a file, or both.
Possible Extension
As I'm thinking about it, I could also see the benefit of printing an abbreviated summary to the terminal, but then saving a comprehensive summary to disk. Not sure how might be best to implement that separation, though.
The text was updated successfully, but these errors were encountered:
I can imagine some situations where a script designer might not want to print the script execution summary at the end of the script (e.g., perhaps it's just far too long), but it would still be beneficial to have that information on hand after the script completes. I think it'd be worthwhile, therefore, to allow for that summary to be saved to disk somehow.
Possible Implementation
We could create a
save_script_execution_summary()
that perhaps callsprint_script_execution_summary()
under the hood, but with a differentrich.console.Console
, and then save that console's text to a file. Or maybe we want to extend the behavior of theprint_
method to allow it to also save to a file if a flag is provided. Then maybe we're talking about adding flags to the parser to specify that the summary is going to the console, a file, or both.Possible Extension
As I'm thinking about it, I could also see the benefit of printing an abbreviated summary to the terminal, but then saving a comprehensive summary to disk. Not sure how might be best to implement that separation, though.
The text was updated successfully, but these errors were encountered: