Iterating command switches from a data file - have a working solution but it seems inefficient
bruno at modulix
onurb at xiludom.gro
Thu Apr 13 04:40:48 EDT 2006
News wrote:
> Hi everyone,
>
> My goal is to pull command switches/options from a file and then assign
> the values to select variables which would eventually be included in a
> class object.
>
> The data file looks something like this but the switches could be in any
> order and not all may be used.
>
> -m quemanager -s server -p port -k key -o object -c 20 -t test at email.com
Have you looked at optparse ?
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list