AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs.
I have a wxPython program. It runs fine on OS X when I launch it from
the Terminal ("pythonw appname.py") . The user wants to be able to
click it. Two main suggestions on the Internet, neither of which
works:
1) "Use Platypus" So I download it, upgrade Stuffit, install both,
figure out how to use it, create an app....and it doesn't work for
graphical apps. Nice to know, thanks for telling me ahead of time!
2) "Just associate .py files with PythonInterpreter". Sounds easy!
So I navigate to appname.py, Get Info, Open With, navigate to
PythonInterpreter....WhereTF is "PythonInterpreter"? Not on the OS X
system anywhere and Google only finds a Python module.
So, how do I create a clickable icon that will launch my wxPython
program? 6 2313
PhysicsGenius wrote: AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs.
I have a wxPython program. It runs fine on OS X when I launch it from the Terminal ("pythonw appname.py") . The user wants to be able to click it. Two main suggestions on the Internet, neither of which works:
1) "Use Platypus" So I download it, upgrade Stuffit, install both, figure out how to use it, create an app....and it doesn't work for graphical apps. Nice to know, thanks for telling me ahead of time!
2) "Just associate .py files with PythonInterpreter". Sounds easy! So I navigate to appname.py, Get Info, Open With, navigate to PythonInterpreter....WhereTF is "PythonInterpreter"? Not on the OS X system anywhere and Google only finds a Python module.
So, how do I create a clickable icon that will launch my wxPython program?
Well you are opening it with pythonw so why not associate *.py with
pythonw or python?
Chris
Chris McD wrote: PhysicsGenius wrote:
AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs.
I have a wxPython program. It runs fine on OS X when I launch it from the Terminal ("pythonw appname.py") . The user wants to be able to click it. Two main suggestions on the Internet, neither of which works:
1) "Use Platypus" So I download it, upgrade Stuffit, install both, figure out how to use it, create an app....and it doesn't work for graphical apps. Nice to know, thanks for telling me ahead of time!
2) "Just associate .py files with PythonInterpreter". Sounds easy! So I navigate to appname.py, Get Info, Open With, navigate to PythonInterpreter....WhereTF is "PythonInterpreter"? Not on the OS X system anywhere and Google only finds a Python module.
So, how do I create a clickable icon that will launch my wxPython program?
Well you are opening it with pythonw so why not associate *.py with pythonw or python?
Chris
I was pretty sure this was impossible, but I may
have done it. For anyone else as frustrated as I
was (and still am, kinda): I associated .py with
/System/Library/Frameworks/Python.framework/Resources/PythonLauncher.
It still brings up a Terminal window, but at
least the app launches from a click.
Mac OS X: It Just Works (poorly)
PhysicsGenius <de*************@gmail.com> wrote: AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs.
Just the perfect approach to get any help whatsoever from those of us
who don't.
*PLONK*.
Alex
On 25-sep-04, at 19:35, PhysicsGenius wrote: Chris McD wrote: PhysicsGenius wrote: AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs.
I have a wxPython program. It runs fine on OS X when I launch it from the Terminal ("pythonw appname.py") . The user wants to be able to click it. Two main suggestions on the Internet, neither of which works:
1) "Use Platypus" So I download it, upgrade Stuffit, install both, figure out how to use it, create an app....and it doesn't work for graphical apps. Nice to know, thanks for telling me ahead of time!
2) "Just associate .py files with PythonInterpreter". Sounds easy! So I navigate to appname.py, Get Info, Open With, navigate to PythonInterpreter....WhereTF is "PythonInterpreter"? Not on the OS X system anywhere and Google only finds a Python module.
So, how do I create a clickable icon that will launch my wxPython program? Well you are opening it with pythonw so why not associate *.py with pythonw or python? Chris
I was pretty sure this was impossible, but I may have done it. For anyone else as frustrated as I was (and still am, kinda): I associated .py with /System/Library/Frameworks/Python.framework/Resources/PythonLauncher. It still brings up a Terminal window, but at least the app launches from a click.
If you asked your question on the pythonmac SIG you'd have gotten your
answer a lot sooner :-)
The best way to build a double-clickeable application on OSX is by
building an .app bundle that contains your application. One way to do
this is using bundlebuilder:
# buildapp.py
from bundlebuilder import buildapp
buildapp(
name = "My Application",
mainprogram = "TableModel.py",
resources = ["English.lproj"],
nibname = "MainMenu",
)
# end of buildapp.py
You can now run 'python buildapp.py build' to create the application
bundle, run 'python buildapp.py' to see some more options. Mac OS X: It Just Works (poorly)
No, it works differently :-)
has wrote: de*************@gmail.com (PhysicsGenius) wrote in message news:<26**************************@posting.google. com>...
So, how do I create a clickable icon that will launch my wxPython program?
http://pythonmac.org/wiki/BundleBuilder
You could also try creating a bundle by hand. I tried that
as an experiment recently, and I got it to work. From memory,
all you need is a directory structure that contains
NameOfApp.app/Contents/MacOS/NameOfApp
where the final NameOfApp is the executable. This can be
a Python script with a #! line that invokes the appropriate
interpreter (python or pythonw). Any other modules that it
needs can be put in the MacOS directory alongside it.
Another way is to use AppletBuilder to create a "skeleton"
bundle from your main .py file, and then manually add other
required modules to the MacOS directory. That will give
you command line emulation, ability to give it a nice icon,
etc.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand http://www.cosc.canterbury.ac.nz/~greg This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Markus |
last post by:
Hello,
I've written a couple of Python scripts on OS X that I would like to
start from the Finder by doing a double-click on them. I guess I have to
create a Package.
Does anybody know an...
|
by: Eric_Dexter |
last post by:
I was looking at vpython and it would seem to be an easy thing to
add to boa-constuctors classes but I am not sure if that is possible
within the boa-constructor interface. Is it possible to do...
|
by: sudhakaranr |
last post by:
Hi all,
I have data in MySql, I want to create a front end for the database.....
which one is easy and standard either tkinter or wx python?
We should pick the values from database...
|
by: dudds |
last post by:
Hi I really haven't used wxPython before and I was just wondering if
there was some sort of timer event that can be used. For example if I
have a database that I want to query at regular intervals...
|
by: Doru Moisa |
last post by:
Hello,
How can I capture the output of a long runnning process which I open
with popen() ?
I tried reading line by line, char by char, but the result always
comes when the process finishes.
(I...
|
by: ateale |
last post by:
Hey guys
I have had a bit of a hunt around on google to try find out how to change the overall default font style/size for a wx.python app - but not had any luck.
Does anyone have any idea if...
|
by: Elias Alhanatis |
last post by:
Hello friends!!!
I am writing a program ( using wx.Python ) in which i want the mainloop
to check every hour a certain database i have conected to the program.
( Most of the time the GUI is idle...
|
by: lee.walczak |
last post by:
Hi,
I have just started writing a GUI using wxpython after finding a
limitation using Tkinter. I have read most tutorials on wxpython and
slowly becoming accustomed considering I started with...
|
by: askalottaqs |
last post by:
i know everyone keeps saying that one needs to be using classes and not just functions, but so far i haven't had any problems with functions aside from the fact that everyone's using them and when i...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |