IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
flags.py
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"))
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
void add_string_flag(std::string name, std::string default_value, std::string description)
void write_help(std::ostream &out=std::cerr)
std::string get_string_flag(std::string name)