I have the following code, and I want to get the string with the value of the file to use in the function:
def openBioActFile():
finestra.openfile = tk.filedialog.askopenfilename(initialdir = cwd,title = "Select file",filetypes = (("text files","*.txt"),("all files","*.*")))
filenamelabel = tk.Label(finestra,text=finestra.openfile)
filenamelabel.pack()
def virtualScreening(infile):
df = pd.read_csv(infile,sep='\t');
I call it in:
vs_text="start Virtual Screening"
vs_label = tk.Label(finestra,text=vs_text)
vs_label.pack()
vs_Button = tk.Button(finestra, text="virtualScreening",
command=virtualScreening)
vs_Button.pack()