IMP  2.2.0
The Integrative Modeling Platform
base/flags.py

A simple example of how to use IMP flags support in a python executable. Run with "--help" to see all available flags.

1 ## \example base/flags.py
2 # A simple example of how to use IMP flags support in a python
3 # executable. Run with "--help" to see all available flags.
4 
5 import IMP.base
6 import sys
7 
8 IMP.base.add_string_flag("hello", "Hello world", "How to say hello")
9 
10 IMP.base.setup_from_argv(sys.argv, "An example for using flags in python.")
11 
12 if IMP.base.get_string_flag("hello") == "":
14  exit(1)
15 
16 print IMP.base.get_string_flag("hello")