Mac app generator
Project description
Install
$ [sudo] pip install mac-app
Classes
mac_app.App
- Mac app generator
method | __doc__ |
---|---|
atexit() |
executed at termination. override this method |
create() |
create Mac app |
mkalias(dst) |
make Mac alias to app |
run() |
main function. you MUST override this method |
sleep(seconds) |
suspend app for the given number of seconds |
@property | __doc__ |
---|---|
app_code |
source code string |
app_folder |
app folder. default is ~/Applications/.appify/ |
app_image |
app image. default is mdfind kMDItemFSName=<name>.png result |
app_name |
app name. default is class name |
app_path |
app path. app_folder +app_name |
app_script |
source script path. default is class module file |
app_stderr |
stderr path. default is ~/Library/Logs/Applications/<name>/err.log |
app_stdout |
stdout path. default is ~/Library/Logs/Applications/<name>/out.log |
pid |
return app pid |
running |
return True if app is running, else False |
Examples
create app from python file
>>> mac_app.App(app_script="file.py", app_name="name").appify().mkalias("~/name.app")
create app from class
>>> import mac_app
>>> class MyApp(mac_app.App):
def run(self):
pass
if __name__ == "__main__":
MyApp().run()
>>> MyApp().appify().mkalias("~/MyApp.app")
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mac-app-2018.12.20.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for mac_app-2018.12.20-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb2e19d274e4057cfbd1f869909872a88af178876fcb98825e8aba0d405cd209 |
|
MD5 | 02a682ba6bb423335f864b9a7f57f309 |
|
BLAKE2b-256 | df26ef81cfa083c94e0a0b93f209896131de825e2f1aaa4de9e6dde7e0bf47db |