Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79305
| 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 <greg.ewing@canterbury.ac.nz> |
| Newsgroups | comp.lang.python |
| Subject | Re: OS X Menubar in Tkinter |
| Date | Mon, 20 Oct 2014 19:47:38 +1300 |
| Lines | 23 |
| Message-ID | <cajpgcFe2rfU1@mid.individual.net> (permalink) |
| References | <a876c046-18aa-4332-bc9a-b1d1181f2b4c@googlegroups.com> <mailman.14989.1413766161.18130.python-list@python.org> |
| 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 | <mailman.14989.1413766161.18130.python-list@python.org> |
| Xref | csiph.com comp.lang.python:79305 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OS X Menubar in Tkinter Noble Bell <noblebell@gmail.com> - 2014-10-19 16:22 -0700
Re: OS X Menubar in Tkinter Ned Deily <nad@acm.org> - 2014-10-19 17:49 -0700
Re: OS X Menubar in Tkinter Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-10-20 19:47 +1300
Re: OS X Menubar in Tkinter Noble Bell <noblebell@gmail.com> - 2014-10-20 03:47 -0700
Re: OS X Menubar in Tkinter Noble Bell <noblebell@gmail.com> - 2014-10-20 18:34 -0700
Re: OS X Menubar in Tkinter Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-21 06:58 +0100
Re: OS X Menubar in Tkinter Noble Bell <noblebell@gmail.com> - 2014-10-21 03:53 -0700
Re: OS X Menubar in Tkinter Kevin Walzer <kw@codebykevin.com> - 2014-10-23 09:25 -0400
Re: OS X Menubar in Tkinter Terry Reedy <tjreedy@udel.edu> - 2014-10-23 13:32 -0400
Re: OS X Menubar in Tkinter Chris Angelico <rosuav@gmail.com> - 2014-10-24 06:02 +1100
Re: OS X Menubar in Tkinter Simon Kennedy <sffjunkie@gmail.com> - 2014-10-28 08:47 -0700
Re: OS X Menubar in Tkinter Rustom Mody <rustompmody@gmail.com> - 2014-10-28 08:59 -0700
Re: OS X Menubar in Tkinter Chris Angelico <rosuav@gmail.com> - 2014-10-29 03:06 +1100
csiph-web