Post #1397:  to one of the popup buttons, it says “invalid syntax”.
Example:
bpy.ops.align.2xyz(axis=‘0’)
One of the variables starts with a numeral (2xyz). We can’t use it like this in python. Try this code:
getattr(bpy.ops.align, "2xyz")('INVOKE_DEFAULT', True, axis="0")
Note that we need to add INVOKE_DEFAULT and True positional arguments in this case.
- INVOKE_DEFAULT starts the operator in interactive mode (if supported)
- True adds undo/redo features (if supported)
PME adds them automatically when the code starts with bpy.ops.