I want the input, someone has put into the Entry widget (E1) of my Tkinter GUI, to be the name of the new folder, because every time someone inputs something, I need to have a new folder named after the input:
def create():
folder = E1.get()
newpath = r"C:\Users\....\folder"
if not os.path.exists(newpath):
os.makedirs(newpath)
This creates a new folder, but it is named folder
and not how I want it named (after the numbers entered into the Entry
box (E1
)).
Making it:
newpath = r"C:\Users\...\E1.get()"
gives me a folder called "E1.get()"
And secondly, but that hopefully comes with the answer to the first question, how do I get to see the input, without putting E1.get()
into a variable?
So is there a way to see it directly and maybe use that as the name of my new folder?