Top "Optionparser" questions

understanding OptionParser

I was trying out optparse and this is my initial script. #!/usr/bin/env python import os, sys from optparse …

python optparse optionparser
How do you specify a required switch (not argument) with Ruby OptionParser?

I'm writing a script and I want to require a --host switch with value, but if the --host switch isn't …

ruby arguments optionparser
How to generate OptionParser require arguments

The code below works, but I am manually raising argument errors for the required arguments using fetch, when I want …

ruby optionparser
Parsing empty options in Python

I have an application that allows you to send event data to a custom script. You simply lay out the …

python optparse optionparser
Ruby: OptionParser: String Arg & Hash Assignment

Using OptionParser for string argument input and hash assignment. What is the best way to read-in multiple variables for a …

ruby variables split variable-assignment optionparser
How to use variable arguments with ruby's OptionParser

I don't know ruby very well, but I'm trying to add some functionality to this script a co-worker wrote. Basically …

ruby optionparser
OptionParser python module - multiple entries of same variable?

I'm writing a little python script to get stats from several servers or a single server, and I'm using OptionParser …

python shell optionparser
How do I handle a missing mandatory argument in Ruby OptionParser?

In OptionParser I can make an option mandatory, but if I leave out that value it will take the name …

ruby command-line optionparser
OptionParse with no arguments show banner

I'm using OptionParser with Ruby. I other languages such as C, Python, etc., there are similar command-line parameters parsers and …

ruby optionparser
Using ruby's OptionParser to parse sub-commands

I'd like to be able to use ruby's OptionParser to parse sub-commands of the form COMMAND [GLOBAL FLAGS] [SUB-COMMAND [SUB-COMMAND …

ruby optparse optionparser