Commit fd598c2d authored by Gino Tosti's avatar Gino Tosti
Browse files

added usage message

parent 2e608a66
......@@ -109,17 +109,18 @@ def removetmpfiles():
print ("Error: %s - %s." % (e.filename, e.strerror))
def getInput():
usage = "usage: %prog [options] arg"
parser = OptionParser()
parser.add_option("-f", "--file", dest="bookfile",
help="ICD Exel File ", metavar="FILE")
parser.add_option("-d", "--dir", dest="basedir", default="./tmp",
help="Root dir where to install the new device ", metavar="DIR")
parser.add_option("-p", "--prefix", dest="prefix", default="astri",
help="pkg prefix es. astri ", metavar="PREFIX")
help="pkg prefix es.: astri ", metavar="PREFIX")
parser.add_option("-m", "--module", dest="module", default="tcs",
help="module name es.tcs ", metavar="MODULE")
help="module name es.: tcs ", metavar="MODULE")
parser.add_option("-i", "--install", dest="install", default=False,
help="execute the Makefile in src dir ", metavar="INSTALL")
help="execute the Makefile in basedir/src dir ", metavar="INSTALL")
(options, args) = parser.parse_args()
#print("running genDevice with the following options:\n", options)
config={}
......
......@@ -8,19 +8,18 @@ from GenDevice.excelIcd import excelIcd
if __name__=="__main__":
usage = "usage: %prog [options] arg"
parser = OptionParser()
today = date.today()
parser.add_option("-f", "--file", dest="book_file",
help="ICD Exel File ", metavar="FILE")
parser.add_option("-s", "--sheet", dest="sheet", default='Main',
help="ICD Exel File Sheet ", metavar="SHEET")
help="ICD Exel File Sheet Name to show", metavar="SHEET")
(options, args) = parser.parse_args()
gen_dir=os.environ["PYGEN"]
excel_file =options.book_file
wb=excelIcd(excel_file)
#wb.getMain()
get=wb.getSheet(options.sheet)
print(get['Unit'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment