get label variables tkinter python

0

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()
    
asked by francesc 05.02.2018 в 10:17
source

0 answers