简体   繁体   中英

Is there any way to make a Python program that has the user use the terminal (NO GUI) into a stand-alone for Mac?

I finally got py2app to work, and my program was made. However, it won't open because it relies on the terminal and raw_input. I just found out py2app is more for GUI interfaces.

All I want, is to turn the program into an application my users can click on, and it'll open in Terminal. Without them having to either install Python, or go to the terminal and type python "filename" (also, don't they have to set up the paths and everything to do that?).

Please help; I've been pulling my hair out all day looking for the answer. If this isn't possible, I'm just going to give them the .py file and instruct them to start it with python in the terminal and hope it's already set up so they can do that.

I know that on a mac you change the extension of the file to .command and that will make it so you can just click on it and it will run through the terminal if that's what it is specified to do. However I'm not sure if it will work if they do not actually have python installed.

Using PyInstaller http://www.pyinstaller.org/ it's possible to make an executable for different platforms. I believe OSX is supported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM