repl.it
@CPUSkull/

CivEditor - library Update!

Tkinter

No description

fork
loading
Files
  • main.py
  • game
  • Library
  • nohup.out
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from tkinter import *
from tkinter import messagebox
import shutil
import os

window = Tk()
window.title("Library Tool")

lb1 = Label(window, text="Library")
lb1.grid(column=1, row=0)

def Lbr1():
  flist = os.listdir("Library")
  print ('\n'.join(flist))

bt1 = Button(window, text="Show Library", command=Lbr1)
bt1.grid(column=1, row=1)

wxt = Entry(window, width=10)
wxt.grid(column=1, row=2)

def Lbr2():
  lb2.configure(text= "Path!")

bt2 = Button(window, text="Path", command=Lbr2)
bt2.grid(column=0, row=2)

lb2 = Label(window, text="Choose File")
lb2.grid(column=0, row=3)

cxt = Entry(window, width=10)
cxt.grid(column=1, row=3)

lb3 = Label(window, text="Library Command")
lb3.grid(column=1, row=4)

def Lbr3():
  shutil.copy("Library/" + cxt.get(), wxt.get() + "/" + "flag")

bt3 = Button(window, text="Import", command=Lbr3)
bt3.grid(column=0, row=5)

def Lbr4():
  os.chdir(wxt.get() + "/" + "flag/")
  os.rename(cxt.get(), rxt.get())

rxt = Entry(window, width=10)
rxt.grid(column=2, row=5)

bt4 = Button(window, text="Rename", command=Lbr4)
bt4.grid(column=1, row=5)

def Lbr5():
  os.remove(wxt.get() + "/" + "flag" + "/" + cxt.get())

bt5 = Button(window, text="Delete", command=Lbr5)
bt5.grid(column=3, row=5)

lb4 = Label(window, text="Result!\n")
lb4.grid(column=1, row=6)

window.mainloop()
?