Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79300

Re: OS X Menubar in Tkinter

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'url:pypi': 0.03; 'defaults': 0.07; 'derived': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'gui': 0.12; '"python"': 0.16; 'menu.': 0.16; 'noble': 0.16; 'py2app': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'simplest': 0.16; 'subject:Tkinter': 0.16; 'url:py2app': 0.16; 'wrote:': 0.18; 'app': 0.19; 'example': 0.22; 'header:User- Agent:1': 0.23; 'documented': 0.24; 'question': 0.24; 'header:X -Complaints-To:1': 0.27; 'appreciated.': 0.29; 'code': 0.31; 'url:wiki': 0.31; 'anyone': 0.31; 'probably': 0.32; 'url:python': 0.33; 'framework': 0.33; 'mac': 0.33; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'executing': 0.36; 'next': 0.36; 'shows': 0.36; 'charset:us-ascii': 0.36; 'similar': 0.36; 'url:org': 0.36; 'application': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'remove': 0.60; 'full': 0.61; 'name': 0.63; 'details': 0.65; 'within': 0.65; 'special': 0.74; 'received:204': 0.75; 'article': 0.77; '3.4': 0.84; 'received:204.14': 0.84; 'url:tk': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Deily <nad@acm.org>
Subject Re: OS X Menubar in Tkinter
Date Sun, 19 Oct 2014 17:49:09 -0700
References <a876c046-18aa-4332-bc9a-b1d1181f2b4c@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 204.14.154.216
User-Agent MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14989.1413766161.18130.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1413766161 news.xs4all.nl 2928 [2001:888:2000:d::a6]:53162
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:79300

Show key headers only | View raw


In article <a876c046-18aa-4332-bc9a-b1d1181f2b4c@googlegroups.com>,
 Noble Bell <noblebell@gmail.com> wrote:
> I am using Python 3.4 on Mac OS X and Tinter 8.5. Does anyone have any code 
> that they would share with me on how to remove the "Python" menu in the 
> menubar at the top next to the "apple'? 
> 
> I would like to have the name of my program there instead and my menu. I can 
> add menus but not sure how to do the special menubar. Any help would be 
> appreciated.

The name that shows up in the menu is derived by OS X from the 
application name in the executing application bundle.  If you don't 
package your program up as an OS X application bundle, defaults will be 
used; in the case of Python OS X framework builds, Python provides a 
Python.app within the framework to allow the Python process to be 
automatically promoted to a full OS X gui process.  Probably the 
simplest approach is to use py2app to create a double-clickable app with 
the name you want.  There's an example in an answer to a similar 
question on Stackoverflow.  And there are some old but still relevant 
details documented in the Tcl/TkAqua FAQ.

https://pypi.python.org/pypi/py2app
http://stackoverflow.com/questions/8695926/remove-default-python-submenu-
with-tkinter-menu-on-mac-osx
http://wiki.tcl.tk/12987

-- 
 Ned Deily,
 nad@acm.org

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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