add multi arg

This commit is contained in:
vincent 2018-01-22 20:42:03 +01:00
parent bafae1ed30
commit ff36d68b98

View File

@ -71,11 +71,10 @@ def enter(evt):
data=load_jsonfile('chaine.json')
fenetre = Tk()
value = StringVar()
try:
sys.argv[1]
value.set(sys.argv[1])
if(len(sys.argv)>1):
arg=True
except IndexError:
else:
value.set("")
arg=False
@ -97,7 +96,9 @@ label2.pack()
bouton_update_base.pack()
fenetre.bind("<Key-Return>",enter)
if (arg==True):
click()
value.set("")
for i in sys.argv[1:]:
value.set(i)
click()
value.set("")
fenetre.mainloop()