import shutil class App(Frame): def __init__(self, master): Frame.__init__(self, master) self.kill() def kill(self): self.a = Label(self, text = "file copier2") self.a.grid(row = 0, column = 0, sticky = W) self.b = Entry(self) self.b = Label(self, text = "please enter the file that the contents should be copied to") self.b.grid(row = 1, column = 0) self.c = Entry(self) self.c.grid(row = 1, column = 1) self.dst = self.c.get() self.d = Label(self, text = "please enter the file that contains the contents") self.d.grid(row = 2, column = 0) self.e = Entry(self) self.src = self.e.get() shutil.copyfile(self.src, self.dst) root = Tk() root.geometry("200x50") root.title("file copier v2") app = App(root) root.mainloop()
Traceback (most recent call last): File "C:/Python27/file copier v2.py", line 26, in <module> app = App(root) File "C:/Python27/file copier v2.py", line 7, in __init__ self.kill() File "C:/Python27/file copier v2.py", line 21, in kill shutil.copyfile(self.src, self.dst)</module>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)