When you create an application with a GUI using Tkinter in Python, the name of your application appears as "Python" in the menu bar on OS X. How can you get it to appear as something else?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
My answer is based on one buried in the middle of some forums. It was a bit difficult to find that solution, but I liked it because it allows you to distribute your application as a single cross platform script. There's no need to run it through py2app or anything similar, which would then leave you with an OS X specific package.
Anyways, I'm sharing my cleaned up version here to give it a bit more attention then it was getting there. You'll need to install
pyobjc
viapip
to get theFoundation
module used in the code.May not be quite what you need but I am surprised no one has mentioned the simple, platform independent way (works with Python 3.x on Win 7) :
and if you want to change the icon: