IMP logo
IMP Reference Guide  2.9.0
The Integrative Modeling Platform
kernel/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 kernel/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
6 import sys
7 
8 IMP.add_string_flag("hello", "Hello world", "How to say hello")
9 
10 IMP.setup_from_argv(sys.argv, "An example for using flags in python.")
11 
12 if IMP.get_string_flag("hello") == "":
14  exit(1)
15 
16 print(IMP.get_string_flag("hello"))