mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2026-10-22 18:02:08 +03:00
Add only csv files in file explorer + avoid dirty exception if no file is chosen
This commit is contained in:
1 parent
5334e3320e
commit
74da851997
1 file changed
+3
-1
@@ -49,7 +49,9 @@ def copy_waypoint(self=None):
|
||||
this.parent.update()
|
||||
|
||||
def new_route(self=None):
|
||||
filename = filedialog.askopenfilename() # show an "Open" dialog box and return the path to the selected file
|
||||
filename = filedialog.askopenfilename(filetypes = (("csv files", "*.csv"),)) # show an "Open" dialog box and return the path to the selected file
|
||||
|
||||
if filename.__len__() > 0:
|
||||
this.next_route = filename
|
||||
|
||||
with open(filename, 'r') as csvfile:
|
||||
|
||||
Reference in new issue
Block a user