I have a program that I can run as
> python transactions.py file.csv
That processes the provided CSV file.
I want to compile it to an executable so my friends can use it without having to install all the packages it requres.
py2app compiles the app, and in 'Alias' mode I'm able to successfully run the application
> ./dist/transactions.app/Contents/MacOS/transactions.csv
However when I complete the actual compilation and have a /dist/transactions.app/ directory created, whenever I try to run
> open /dist/transactions.app file.csv
the program fails with
> 1/29/15 1:05:11.190 PM transactions[25848]: txn_csv = sys.argv[1]
> 1/29/15 1:05:11.190 PM transactions[25848]: IndexError: list index out of range
right after the line in my program that sets a variable equal to sys.argv[1]
What am I doing wrong, and how can I run this program with input from a CLI argument at sys.argv[1] ?