getopt issues

David Bear david.bear at asu.edu
Wed Aug 27 00:13:35 EDT 2003


I'm stumped.  Trying to follow the docs and .. failure.

here's the args

>>> args
'-Middwb at mainex1.asu.edu -AKHAAM at prlinux+898 -CA --D2003-08-20-09:28:13.417 -Ff -Hprlinux --JTCPIP_NPF_TEST_DARS_PORTRAIT -NTCPIP_NPF_TEST_DARS_PORTRAIT --Pholdqueue -Qholdqueue -aacct -b2895 -d/var/spool/lpd/holdqueue -edfA898prlinux -fTCPIP_NPF_TEST_DARS_PORTRAIT -hprlinux -j898 -kcfA898prlinux -l66 -nKHAAM -sstatus -t2003-08-20-09:28:13.000 -w80 -x0 -y0 acct \n'


I know, they're long.  sorry.  they just are.  and maybe thats the
bug.

here's what happens

>>> a, b = getopt.getopt(args, 'APQn')
>>> a
[]
>>> b
'-Middwb at mainex1.asu.edu -AKHAAM at prlinux+898 -CA --D2003-08-20-09:28:13.417 -Ff -Hprlinux --JTCPIP_NPF_TEST_DARS_PORTRAIT -NTCPIP_NPF_TEST_DARS_PORTRAIT --Pholdqueue -Qholdqueue -aacct -b2895 -d/var/spool/lpd/holdqueue -edfA898prlinux -fTCPIP_NPF_TEST_DARS_PORTRAIT -hprlinux -j898 -kcfA898prlinux -l66 -nKHAAM -sstatus -t2003-08-20-09:28:13.000 -w80 -x0 -y0 acct \n'


not at all what the docs lead me to believe.  Is getopt buggy?

I'm on python 2.2.2 on linux but will also be using python 2.1.3 on
FreeBsd.

Advice?

--
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"




More information about the Python-list mailing list