I need the text of an entry that I want to output with print()
the Entry is e_out
from tkinter import * from tkinter import filedialog import os def resample():
e_out = StringVar()
os.system('ffmpeg -i "'+ filename + '.mp4" -vf "tblend=all_mode=average,framestep=2,tblend=all_mode=average,framestep=2"
-r 60 '+ e_out + '.mp4')
os.system("cls")
def file_browser():
global e_out
global filename
global resample
root1 = Tk()
root1.geometry("600x400")
e_out = Entry(root1).pack()
filename = filedialog.askopenfilename(initialdir="/Videos", title="Select A File", filetypes=(("videos", "*.mp4"),("all files", "*.*")))
print(filename)
b1 = Button(root1, text="resample", command=resample).pack()
root1.mainloop()
global root root = Tk()
root.geometry("800x500")
root.title("intler")
choose = Button(root, text="choose a file", command=file_browser).pack()
root.mainloop()
you can get the text in an entry box by using the line:
e_out.get()
this will return a string with text in the entry box
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.