From 2ccf67ac6e29ee14ed88c86127cb34a91b4b4775 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 11 Jul 2019 22:40:20 +0200 Subject: [PATCH] Allow parsing CLI arguments --- main/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/main.py b/main/main.py index c63514a..f657943 100644 --- a/main/main.py +++ b/main/main.py @@ -1,6 +1,7 @@ import calendar import datetime import pprint +import sys from data.departments import DEPARTMENTS from data.cities import CITIES @@ -153,6 +154,8 @@ class InseeData: def main(): # insee_number = "168127982980507" insee_number = "269059913116714" + if len(sys.argv) > 1: + insee_number = sys.argv[1] data = InseeData(insee_number) print(data) pprint.pprint(data.to_dict())