Top "Command-line-arguments" questions

Programming command line utilities that take parameters.

Restricting values of command line options

How do I restrict the values of the argparse options? In the below code sau option should only accept a …

python command-line-arguments argparse
How to pass command line parameters from a file

I have a C program that reads command line arguments from argv. Is it possible to make a pipe to …

linux pipe command-line-arguments cat argv
Why do I need "sys.argv" to start a QApplication in PyQt?

I try to understand what PyQt does. And one of the first things I didn't, was: QApplication(sys.argv) Why …

python pyqt command-line-arguments qapplication
How to properly compare command-line arguments?

I am trying to write a C code which takes arguments in main; thus when I write some strings in …

c string command-line-arguments string-comparison strcmp
Create a tag / branch from local working copy using SVN

I have a Nant script which updates a directory with the latest source code (checked out from the svn repository), …

svn tortoisesvn tagging command-line-arguments working-copy
How do I format positional argument help using Python's optparse?

As mentioned in the docs the optparse.OptionParser uses an IndentedHelpFormatter to output the formatted option help, for which which …

python command-line formatting command-line-arguments optparse
how can I force division to be floating point in Go?

I have the following code snippet: package main import("fmt";"flag") func main() { var a = flag.Int("a",0,"divident") var …

go command-line-arguments floating-point-conversion
commander.js : how to specify required cli argument

I'm using commander.js package for parsing command-line arguments: I'd like to make a flag non-optional, the API and tests …

node.js command-line-arguments required-field node-commander
How do I use getopt_long to parse multiple arguments?

#include <iostream> #include <getopt.h> #define no_argument 0 #define required_argument 1 #define optional_argument 2 int main(…

c++ parsing command-line-arguments getopt-long