forked from tdwojak/Python2017
20 lines
432 B
Python
20 lines
432 B
Python
import task00 as t0
|
|
import sys, argparse
|
|
|
|
def main():
|
|
#liczby = sys.argv[1:]
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("floats", help="Lista liczb zmiennoprzecinkowych", nargs = "+")
|
|
args = parser.parse_args()
|
|
|
|
liczby = args.floats
|
|
|
|
try:
|
|
print(t0.suma(liczby))
|
|
except ValueError:
|
|
print("Wrong types of arguments passed!")
|
|
raise
|
|
|
|
if __name__ == "__main__":
|
|
main() |