parser = OptionParser(option_class=eng_option)
parser.add_option("-t", "--transmit", action="store_true", default=False,
help="enable sounding transmitter")
parser.add_option("-f", "--frequency", type="eng_float", default=0.0,
help="set frequency to FREQ in Hz, default is %default",
metavar="FREQ")
(options, args) = parser.parse_args()
This is the option I create. It works well in the terminal window. I don't know
hwo to write the argument in run configuration>arguments tab.
Yan
> Date: Fri, 8 Jan 2010 20:20:10 -0200
> From: fabi...@gmail.com
> To: pydev-users@lists.sourceforge.net
> Subject: Re: [Pydev-users] question about python run with option entered
>
> > Thank you Fabio. I've tried that,but it doesn't work for me.
> > I write the argument like: ${options="-t"}${options="-f"}${args="3000000"}
> > for this optionparser.
> >
>
> You mean that sys.argv doesn't have the arguments you're setting? What
> are the sys.argv contents?
>
> Cheers,
>
> Fabio
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Pydev-users mailing list
> Pydev-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pydev-users
_________________________________________________________________
MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
http://kaba.msn.com.cn/?k=1
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users