Trigger menu item with python

Again: you do not run menu items in code. Au contraire, the menu items trigger code. Or to be precise, methods, and you would access those methods in code. In other words: Menu items are not an end in themselves, they trigger an action. And it is that action you want to code, not the triggering of GUI elements.

If you tell me what you want to do, I can help you find the right method.