I apologize for such a basic question. I've done some research online and still cannot figure out for the life of me how to turn a python folder into something like an actual app I can open in OS X. I am using Mac OS X, Terminal and Coderunner for my Python project.
-
Can you be more specific about what you mean by "actual app"? The answer will depend on that.Jared– Jared2013-08-27 18:55:59 +00:00Commented Aug 27, 2013 at 18:55
-
1What do you mean, python folder into an app?user1971598– user19715982013-08-27 18:57:52 +00:00Commented Aug 27, 2013 at 18:57
2 Answers
Here are a few options:
- Platypus is not Python-specific. It lets you wrap a simple GUI around a command line tool.
- py2app is Python-specific and a good choice if you have a GUI, or need to run in the background.
- PyInstaller is similar to py2app but cross-platform; I've never used it, so I don't know how well it works.
The right choice depends on what your program does; who is the expected audience — do you need to redistribute it, if so how, and so forth. If you want to make the application entirely self-contained — not dependent on anything else beyond the OS — then things get more complicated (though certainly not insoluble; there are several commercial Mac desktop apps written in Python.)
6 Comments
Typically you would make the script executable by putting
#!/usr/bin/env python
as the first line, and then in a terminal window typing
chmod u+x myscript.py
You might also want to put it in a special scripts folder and then add that to your PATH by editing .bash_profile. (I am putting a lot of buzz-words here to help you find the tutorials explaining how these things work.)
You can wrap your script into an Automator object if you want to try running it that way, but in the long run you will be better off getting comfortable working in a terminal window.
It would also help to know what your app does: Process files, generate a GUI, do a calculation, etc...