The "Python" menu is likely the menu from the MainMenu.nib in the Python.app application hidden in Python.framework. That application makes it possible to use GUI APIs in a command-line script without having to resort to private APIs.
The best way to get the proper behavior is to create an application bundle, either through py2app or manually.