Questions tagged [optionparser]

93 questions
-1
votes
1 answer

Ruby Options Parser with list of input values

I am new to ruby and working on a script with command line options. I need to specify a list of valid input values(String) for a field. Is there a concise way to do this.
Bo Yuan
  • 107
  • 1
  • 12
-1
votes
1 answer

How to shift ARGV after OptionParser?

I'm extending a class, which uses OptionParser to parse command-line options. I'd like my class to process the arguments remaining after the last option. Is there some equivalent in Ruby to the optind available to the callers of getopt(3) in C? Some…
Mikhail T.
  • 3,043
  • 3
  • 29
  • 46
-1
votes
1 answer

How to have value of option.parser be passed to some other variable using python?

I have python script which is updating the values of variables inside a file, the variable values are curently harcoded but they are to be passed at run time using commandline parameters. My code as follows: import subprocess import time …
Learner
  • 453
  • 13
  • 29
1 2 3 4 5 6
7