#import statements
from Tkinter import *
import tkMessageBox
import tkFont
from PIL import ImageTk,Image
Run Code Online (Sandbox Code Playgroud)
导入图片的代码:
app = Tk()
app.title("Welcome")
image2 =Image.open('C:\\Users\\adminp\\Desktop\\titlepage\\front.gif')
image1 = ImageTk.PhotoImage(image2)
w = image1.width()
h = image1.height()
app.geometry('%dx%d+0+0' % (w,h))
#app.configure(background='C:\\Usfront.png')
#app.configure(background = image1)
labelText = StringVar()
labelText.set("Welcome !!!!")
#labelText.fontsize('10')
label1 = Label(app, image=image1, textvariable=labelText,
font=("Times New Roman", 24),
justify=CENTER, height=4, fg="blue")
label1.pack()
app.mainloop()
Run Code Online (Sandbox Code Playgroud)
此代码不起作用.__CODE__我想导入背景图片.
是否有任何API可以使用该页面的标题或页面ID或网址获取页面的所有类别?我尝试在网上搜索,但我能找到的只是获取特定类别的转储.任何形式的帮助将受到高度赞赏.谢谢