Last active
February 3, 2019 21:32
-
-
Save gregorleban/bcb6e79a4c64d939791c7678a0252a3e to your computer and use it in GitHub Desktop.
[Using OptionParser] #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
# specify cmd-line args | |
from optparse import OptionParser | |
parser = OptionParser(usage="Usage: %prog mode [options]") | |
# params for downlading links | |
parser.add_option("-f", "--source-file", dest="sourceFile", action="store", type="string", default = None, help = "file with list of sources to analyze") | |
parser.add_option("-t", "--threads", dest="threads", action="store", type="int", default=30, help="number of threads used to process queue") | |
parser.add_option("-d", action="store_true", dest="download", help = "Download concept stats") | |
# parse cmd-line args | |
options, args = parser.parse_args() | |
for arg in args: | |
inst.computeFilteredFile(arg) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment