Argparse: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argpars...")
 
No edit summary
Line 1: Line 1:
In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argparse, options can appear in any order, before or after positional arguments. Argparse also automatically produces a "help" screen for explaining (reminding) how a script can be used.
In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argparse, options can appear in any order, before or after positional arguments. Argparse also automatically produces a "help" screen for explaining (reminding) how a script can be used.
== Resources ==
http://docs.python.org/library/argparse.html#module-argparse

Revision as of 13:40, 26 October 2011

In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argparse, options can appear in any order, before or after positional arguments. Argparse also automatically produces a "help" screen for explaining (reminding) how a script can be used.

Resources

http://docs.python.org/library/argparse.html#module-argparse