0

I am making an app in python, which is able to open different file types. This code in running fine on eclipse while passing filename which I want to open and configuration file as arguments respectively. Now I converted this into application by using py2app. So, the issue is how to deal with arguments, as different file types need to be open through app and this app also needs configuration file while processing. Is there any different methods available for making app which can be installed on mac osx.

1 Answers1

0

You can fix the location of configuration file on Resources location(Show Package Contents) of your app.

from setuptools import setup

APP=['CC4Box.py']
DATA_FILES= [('',['config.cfg'])]
OPTIONS={'iconfile':'cc.icns','argv_emulation': True,'plist':{'CFBundleShortVersionString':'1.0','CFBundleExecutable':'MYapp'}}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app']
imp
  • 1,967
  • 2
  • 28
  • 40