MCPcopy Create free account
hub / github.com/Moduland/csv2vcf / openfile

Function openfile

csv2vcf/__main__.py:31–49  ·  view source on GitHub ↗

This function ask for opening file with tkinter :return: filename as str

()

Source from the content-addressed store, hash-verified

29 except Exception:
30 print("Error In Opening Final File")
31 def openfile():
32 '''
33 This function ask for opening file with tkinter
34 :return: filename as str
35 '''
36 global filename
37 filename = askopenfilename(filetypes=(("CSV File", "*.csv")
38 , ("Text File", "*.txt")
39 ))
40 folder=os.path.dirname(filename)
41 time_1 = time.perf_counter()
42 counter = csv_reader(filename)
43 time_2 = time.perf_counter()
44 delta_time = time_2 - time_1
45 if counter!=None:
46 print(str(counter) + " VCF File Generated In " + time_convert(delta_time))
47 messagebox.showinfo("CSV2VCF",str(counter) + " VCF File Generated In " + time_convert(delta_time))
48 open_folder(folder)
49 return filename
50
51 def tkinter_exit():
52 '''

Callers

nothing calls this directly

Calls 3

csv_readerFunction · 0.85
time_convertFunction · 0.85
open_folderFunction · 0.85

Tested by

no test coverage detected