Allow multiple CLI arguments
This commit is contained in:
parent
2ccf67ac6e
commit
24459bc94d
1 changed files with 7 additions and 6 deletions
|
@ -152,13 +152,14 @@ class InseeData:
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# insee_number = "168127982980507"
|
numbers = ["269059913116714", "168127982980507"]
|
||||||
insee_number = "269059913116714"
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
insee_number = sys.argv[1]
|
numbers = sys.argv[1:]
|
||||||
data = InseeData(insee_number)
|
for number in numbers:
|
||||||
|
data = InseeData(number)
|
||||||
print(data)
|
print(data)
|
||||||
pprint.pprint(data.to_dict())
|
pprint.pprint(data.to_dict())
|
||||||
|
print('\n\n')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue