Get an executable list of executed operators in python
Here's a solution I found. It’s not a nice one, but the best I could come up with:

context = bpy.context.area.type
bpy.context.area.type = “INFO”
bpy.ops.info.select_all_toggle()
bpy.ops.info.report_copy()
bpy.ops.info.select_all_toggle()
bpy.context.area.type = context
clipboard = bpy.context.window_manager.clipboard
clipboard = clipboard.splitlines()


So basically I’m changing the active context to the Info Space to then select everything and then copy it. The copied text is then split into lines, so you get a list with operators, that are formatted nicely.