1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Rep Power

    Question what option to use in "setup.py" file so, generated .exe reads command line input?

    Hello Everybody,

    I am trying to generate .exe from .py , which read from file. A file is supply as argumanet to .exe .What should i used in "Setup.py"file so, generated .exe file will accept input argument?

    I have very less experince in writing setup.py file. Please anybody can provide any example or helpful link.

    Thanks lot.

  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Cambridge, UK
    Rep Power
    I suggest you write your python code first - get it debugged and then try to use py2exe

    python myprog.py textfile.txt

    Is the same as doing:

    myprog.exe textfile.txt
    after py2exe has compiled it.

    Have a look at the sys (sys.argv), getopt and optparse modules for ideas on reading the command line.

    py2exe has nothing to do with reading the command line (except to read parameters for intself). You don't need py2exe until you are ready to give your program to someone who does not have python installed.


IMN logo majestic logo threadwatch logo seochat tools logo