Size: 73
Comment:
|
Size: 880
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
This tutorial covers the necessary steps to incorporate a e2program into the projectmanager. === Modifications to the e2program itself === Canonical e2programs must maintain the following standards 1. Options are handled via EMArgumentParser, which is a subclass of Python's argparse module (version 2.7 and higher). 1. Arguments are handled via EMArgumentParser. 1. A line usage = """blah, blah, blah...""" must be present to give help info on the e2program 1. A line progname = os.path.basename(sys.argv[0]) must be present To illustrate, here is an example program: {{{#!highlight python #!/usr/bin/env python from EMAN2 import * def main(): progname = os.path.basename(sys.argv[0]) usage = """prog arg1, arg2, [options] This is an exmaple program """ }}} |
Tutorial to aid adding a new e2program to the e2projectmanager.py
This tutorial covers the necessary steps to incorporate a e2program into the projectmanager.
Modifications to the e2program itself
Canonical e2programs must maintain the following standards
- Options are handled via EMArgumentParser, which is a subclass of Python's argparse module (version 2.7 and higher).
- Arguments are handled via EMArgumentParser.
- A line usage = """blah, blah, blah...""" must be present to give help info on the e2program
- A line progname = os.path.basename(sys.argv[0]) must be present
To illustrate, here is an example program: