Nov-20-2017, 05:23 AM
i am nearly finished with a new script that has a lot of code dedicated to argument and option scanning. i think i need to write my own option scanning function(s). existing tools like getopt just don't "cut the mustard". one of the reasons is that i frequently use '-' and '+' and '--' and '++' for options, as well as embedded '=' and ':' for name=value option. i also use multiple single letter options in the same argument as well as mixing '-' and '+' that way. for example my rls command (implemented in C, some day to be re-implemented in Python) can be invoked to do exactly the same thing, 2 ways:
call( ['rls','+f','+l','-l','-p','foobar'] ) # or call( ['rls','+fl-lp','foobar'] )notice that the 'l' has a different meaning after '+' (select symlinks to be listed) compared to after '-' (lots of info,but not symlink reference). i want to make this library before doing 'rls' in Python.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.