Using optparse

Aahz aahz at pythoncraft.com
Thu Apr 23 15:50:36 EDT 2009


In article <b0195ff6-7dc1-42eb-819c-5b5b5a9bb41f at g1g2000yqh.googlegroups.com>,
loial  <jldunn2000 at googlemail.com> wrote:
>
>A shell script is passing parameters to my python script in the
>following format
>
>-PARAM1 12345 -PARAM2 67890
>
>Can I parse these with optparse  ? If so how?

You might try using shlex instead.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list