-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpython_boilerplate.py
More file actions
46 lines (39 loc) · 919 Bytes
/
python_boilerplate.py
File metadata and controls
46 lines (39 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# script_name.py
#
# Usage: python3 script_name.py arg1 arg2 ...
# Text explaining script usage
# Parameters:
# arg1: description of argument 1
# arg2: description of argument 2
# ...
# Output:
# A description of the script output
#
# Written by First Last
# Other contributors: None
#
# Optional license statement, e.g., See the LICENSE file for the license.
# import Python modules
# e.g., import math # math module
import sys # argv
# "constants"
# e.g., R_E_KM = 6378.137
# helper functions
## function description
# def calc_something(param1, param2):
# pass
# initialize script arguments
# arg1 = '' # description of argument 1
# arg2 = '' # description of argument 2
# parse script arguments
# if len(sys.argv)==3:
# arg1 = sys.argv[1]
# arg2 = sys.argv[2]
# ...
# else:
# print(\
# 'Usage: '\
# 'python3 script_name.py arg1 arg2 ...'\
# )
# exit()
# write script below this line