[Pythonmac-SIG] made app using py2app, can't pass arguments properly

Ian McLean ian at auricom.com
Sun Jan 2 18:56:16 CET 2011


Hi,

I'm new to python/py2app. My original python script accepts arguments as such:

python merge.py -o outfile.txt - i infile1.txt infile2.txt

Once I create the .app from py2app using argv emulation this no longer works and I get the following feedback:

new-host:dist Ian$ merge -o outfile.txt -i infile1.txt infile2.txt
merge: unknown option: -o
merge: usage: merge [-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3
merge: too many arguments

this is the setup.py that py2app generated automatically

"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['merge.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

Any idea what I'm doing wrong? Thanks in advance!



More information about the Pythonmac-SIG mailing list