Question about converting Python to Ruby - getopt

Is there an equivalent in Ruby of Python’s getopt (it parses
command-line
arguments)?

Mike S.

quoth the Mike S.:

Is there an equivalent in Ruby of Python’s getopt (it parses command-line
arguments)?

Mike S.

There are two: GetOptLong and OptionParser. Both are in the Standard
Library.
I believe GetOptLong is closer to the Python implementation.

-d

On 5/14/07, Mike S. [email protected] wrote:

Is there an equivalent in Ruby of Python’s getopt (it parses command-line
arguments)?

Look into the GetoptLong and optparse libraries. They are both part
of the Ruby standard library.