Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: OS X Menubar in Tkinter Date: Mon, 20 Oct 2014 19:47:38 +1300 Lines: 23 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 7sn0yygYxYzMVII8Lz76+gk6MMWpYx8ewdcF7q690vE82vmJ+2 Cancel-Lock: sha1:jH/zanmytp0ts4V3h5JFb7bgD8I= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:79305 Ned Deily wrote: > The name that shows up in the menu is derived by OS X from the > application name in the executing application bundle. I found a hackish way to change it at run time while working on PyGUI, but it requires using PyObjC: from Foundation import NSBundle def change_application_name(new_name): # Arrange for the application name to be used as the title # of the application menu. ns_bundle = NSBundle.mainBundle() if ns_bundle: ns_info = ns_bundle.localizedInfoDictionary() if not ns_info: ns_info = ns_bundle.infoDictionary() if ns_info: if ns_info['CFBundleName'] == "Python": ns_info['CFBundleName'] = new_name -- Greg