On Sun, Mar 13, 2011 at 12:16 PM, Ryan Hussain <ryanh....@gmail.com> wrote:

> Hello,
>
> I was wondering if there is a solution to add arguments to a compiled
> python script, compiled with py2exe? For example I would like to do
> something such as running my script named "demo.exe -a". With the -a
> argument I would like to run a function. How can I define arguments in my
> script?


 Have you tried using sys.argv?
http://docs.python.org/library/sys.html#sys.argv

HTH,
Wayne
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to