简体   繁体   中英

Create python app for mac

I have built a python command prompt program that I would like to export so that when an icon is clicked, it will automatically run, much like an app, but I have never seen an app that runs in the terminal. Should I try to make it an app and if so, how is this done? (Specifically for Mac)

If you're talking about packaging your python script into a standalone application for Mac, you can use py2app

Link Here: https://pythonhosted.org/py2app/

You basically just write a python script, and then use this to help package it.

I hope this helped!

If you don't want a standalone app, just run a python script by clicking an icon, you can make a simple bash script to do it.

Here is a simple tutorial on that.

If your script is small then the python docs indicate that the "Build Applet" tool might do the needful. See paragraph 4.5 of this link .

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