from sys import argv
script, lira_cbt, [eur_hedge] = argv
if eur_hedge == None:
#Do x
else:
#Do y
I want it to be able to run with just lira_cbt as an argument (doing x), or with both lira_cbt and eur_hedge (doing y). Can this be achieved with sys.argv?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…