python 3インタラクティブインタフェースのプログラミング

1256 ワード

環境:python 3.4.3, tkinker
from tkinter import *   #          Tkinter  
from PIL import ImageTk,Image # ImageTk             Tkinter     PhotoImage  
import pythonsoft as ps #    python    

root = Tk()#       
root.title('Special Module')#      
image =Image.open('1.gif')#    
background_image = ImageTk.PhotoImage(image)
w = background_image.width()
h = background_image.height()
root.geometry('%dx%d+0+0' % (w,h))#      
background_label = Label(root, image=background_image)#          
background_label.place(x=0, y=0, relwidth=1, relheight=1)

#input data       
v1 = StringVar()
v2 = StringVar()

#  label    
a1=Label(root,text='Point Cloud (.pcd):',padx=10,font=('Times', 20),fg='black', bg='white')
a2=Entry(root,width=15,textvariable=v1,validate='key',font=('Times', 16))
#result show
e1=Entry(root,width=60,textvariable=vr,state='readonly',font=('Times', 20))
a1.place(x=50,y=200)
a2.place(x=280,y=200)
e1.place(x=50,y=490)
#    
def pathfind:
    xxxxx(v1.get())
    xxxxx v2.get(xxx)
#         
e2=Button(root,text='START',command=pathfind,font=('Times', 20),width=12)
e2.place(x=170,y=390)

mainloop()#