optparse module

pragma pragma_member at pathlink.com
Fri Apr 14 12:51:05 PDT 2006


In article <e1op4c$2ueu$1 at digitaldaemon.com>, Daniel Keep says...
>
>Yup.  Definitely need to learn to look better :P
>
>In all honesty, I never liked getopt.  Too fiddly for my tastes.  I
>suppose in the end, the good thing about all these different
>implementations is that when Walter chooses one (you ARE going to put
>one in the standard library, right?), he'll have a wide selection to
>make his choice from.
>
>And when he picks one, we can all bitch endlessly about it here ^_^
>
>Ah well.  I think I'll go work on short form now... must... dethrone...
>other... implementations...
>
>	-- Daniel

Well, while we're on the topic, how about ArgParser for a twist:

http://svn.dsource.org/projects/ddl/trunk/utils/ArgParser.d

Example of it in action:

http://svn.dsource.org/projects/ddl/trunk/utils/ddlinfo.d
>
>jcc7 wrote:
>> In article <e1ocf1$2iej$1 at digitaldaemon.com>, Daniel Keep says...
>>> This is a multi-part message in MIME format.
>>> --------------090201060608040605000801
>>> Content-Type: text/plain; charset=UTF-8
>>> Content-Transfer-Encoding: 7bit
>>>
>>> Me again :P
>>>
>>> I found I needed something to dump a file as hex the other day, so
>>> naturally the first thing I wrote was a command-line argument parser :P
>>>
>>> Here's the preliminary version, and since I can't see anything similar
>>> in either phobos or on dsource, I thought I'd post it up here to see if
>>> anyone thinks I should try getting it online somewhere.
>> 
>> Something like really needs to be added to Phobos since it's such a popular
>> idea. I created a wiki page to list the existing modules (including this newest
>> one): http://www.prowiki.org/wiki4d/wiki.cgi?Phobos/PosixGetOpt
>> 
>> jcc7
>
>-- 
>
>v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
>a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP    http://hackerkey.com/

- EricAnderton at yahoo



More information about the Digitalmars-d mailing list