From: Jimmy Retzlaff <jimmy@re...> - 2005-12-19 00:00:56
Mathieu Drapeau wrote:
> I am trying to do a very basic command-line program that takes several
> options. I tried it on linux and it worked but compiled with py2exe on
> windows machine when giving the right argument (here is "-c"), it says
> options -c not recognized. Do you have an idea how to fix that?
> Here is a part of the program that doesn't work when I call the
> (test.exe -c)
> from distutils.core import setup
> import py2exe
> from optparse import OptionParser
> parser =3D OptionParser()
> parser.add_option("-c", dest=3D'toto', action=3D'store_true', =
> toto toto')
I took your first block and put it into setup.py, and I put the second
block into test.py and added the line:
After doing "setup.py py2exe" I get:
J:\py2exe\Mathieu Drapeau\dist>test.exe -c
Have you tried it in isolation like this? If it works for you then try
adding the rest of your program back in until you see the trouble spot.
Get latest updates about Open Source Projects, Conferences and News.