I am making an app in python, which is able to open different file types. This code is running fine on eclipse while passing filename which I want to open and configuration file as arguments respectively selectedFileName=(sys.argv)[1]
cfgFile=(sys.argv)[2]
. 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. Through py2app, in terminal passing this command open -a myapp.app selectedFileName config.cfg
opens the file as expected. But, What I want is to directly open file of any extension without the use of terminal. Is openwith
for opening file possible in this case, then how?. What changes I have to make in code for passing arguments for both? I also want to distribute this app to others.
You can use py2app. It makes a standard app. All it needs is a python script and setup.py.