i can’t make a directory using defined variables, i get an , WindowsError: [Error 183] Cannot create a file when that file already exists:
i tried something like this:
import os, ConfigParser
import Tkinter as tk
root = Tk()
exp_no = ""
config = ConfigParser.ConfigParser()
config.read("config.ini")
resultado = config.get("General", "lugar_exp")
en1 = tk.Entry(root, width = 30, background = 'white', textvariable = exp_no)
en1.pack()
os.mkdir(resultado+'/'+en1.get())
I believe that
is running as
because
en1.get()might be empty or concatanation of paths is wrong which results in justresultado.Could you verify that
en1.get()contains something? And could you useos.path.join?