Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 843153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:04:46+00:00 2026-05-15T06:04:46+00:00

I am trying to create a pure-Python application bundle for a wxPython app. I

  • 0

I am trying to create a pure-Python application bundle for a wxPython app. I created the .app directory with the files described in Apple docs, with an Info.plist file etc. The only difference between a “normal” app and this bundle is that the entry point (CFBundleExecutable) is a script which starts with the following line:

#!/usr/bin/env python2.5

Everything works fine except that the application name in the OSX menubar is still “Python” although I have set the CFBundleName in Info.plist (I copied the result of py2app, actually). The full Info.plist can be viewed here.

How can I change this? I have read everywhere that the menubar name is only determined by CFBundleName. How is it possible that the Python interpreter can change this in runtime?

Note: I was using py2app before, but the result was too large (>50 MB instead of the current 100KB) and it was not even portable between Leopard and Snow Leopard… so it seems to be much easier to create a pure-Python app bundle “by hand” than transforming the output of py2app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:04:46+00:00Added an answer on May 15, 2026 at 6:04 am

    The “Build Applet.app” that comes with the Python developer tools is actually a pure-Python app bundle. It does the following:

    • a Python interpreter is placed (or linked) into the MacOS/ directory
    • the executable script (Foo.app/Contents/MacOS/Foo) sets up some environment variables and calls os.execve() to this interpreter.

    The executable script looks like this (it is assumed that the entry point of the program is in Resources/main.py):

    #!/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
    import sys, os
    execdir = os.path.dirname(sys.argv[0])
    executable = os.path.join(execdir, "Python")
    resdir = os.path.join(os.path.dirname(execdir), "Resources")
    libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
    mainprogram = os.path.join(resdir, "main.py")
    
    sys.argv.insert(1, mainprogram)
    pypath = os.getenv("PYTHONPATH", "")
    if pypath:
        pypath = ":" + pypath
    os.environ["PYTHONPATH"] = resdir + pypath
    os.environ["PYTHONEXECUTABLE"] = executable
    os.environ["DYLD_LIBRARY_PATH"] = libdir
    os.environ["DYLD_FRAMEWORK_PATH"] = libdir
    os.execve(executable, sys.argv, os.environ)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to create a pure ActionScript 3 AIR project, without Flex, somewhat like
Background: I'm trying to create a pure D language implementation of functionality that's roughly
Trying to create an app that does some socket communication (Writing only). I can
I want to call a C library from a Python application. I don't want
I've written a container type in Python and I'm trying to write a robust
I'm trying to create a pretty simple WPF interface, and from what I know
I´m trying to create a VIEW in SQL Server 2005. The SQL code is
Im trying to create an event for each (a) element in a list (ul).
I'm trying to create a generic class which will have some static functions based
I'm trying to create a csv export of data from mysql using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.