Prev: Creating exception class with custom fields in Python/C API
Next: Famous Emacs People With Hand Injuries
From: dirknbr on 28 Jun 2010 06:18 I want to compile as an exe using py2exe but the function should take arguments. How would I do this? Currently my exe runs (no errors) but nothing happens.
From: Martin P. Hellwig on 28 Jun 2010 06:26 On 06/28/10 11:18, dirknbr wrote: > I want to compile as an exe using py2exe but the function should take > arguments. How would I do this? Currently my exe runs (no errors) but > nothing happens. > I am not sure if I understand your question correctly, have you used a module like optparse and it doesn't do anything? It works for me the last time I used it. -- mph
From: dirknbr on 28 Jun 2010 06:40 On Jun 28, 11:26 am, "Martin P. Hellwig" <martin.hell...(a)dcuktec.org> wrote: > On 06/28/10 11:18, dirknbr wrote: > > > I want to compile as an exe using py2exe but the function should take > > arguments. How would I do this? Currently my exe runs (no errors) but > > nothing happens. > > I am not sure if I understand your question correctly, have you used a > module like optparse and it doesn't do anything? It works for me the > last time I used it. > > -- > mph Aha that might be it, I had a look at http://docs.python.org/library/optparse.html How do you integrate (options, args) = parser.parse_args() with our function?
From: dirknbr on 28 Jun 2010 08:13
On Jun 28, 11:40 am, dirknbr <dirk...(a)gmail.com> wrote: > On Jun 28, 11:26 am, "Martin P. Hellwig" <martin.hell...(a)dcuktec.org> > wrote: > > > On 06/28/10 11:18, dirknbr wrote: > > > > I want to compile as an exe using py2exe but the function should take > > > arguments. How would I do this? Currently my exe runs (no errors) but > > > nothing happens. > > > I am not sure if I understand your question correctly, have you used a > > module like optparse and it doesn't do anything? It works for me the > > last time I used it. > > > -- > > mph > > Aha that might be it, I had a look athttp://docs.python.org/library/optparse.html > How do you integrate (options, args) = parser.parse_args() > with our function? Ok I had a look at this now http://wiki.python.org/moin/OptParse and got it. |