python表白神器_python实现抖音表白神器

跟着老杨玩python

要表白,python帮你搞定

from tkinter import *

from PIL import Image ,ImageTk

import tkinter

import tkinter.messagebox

root=Tk()

root.title('小姐姐,我要向你表白!')

root.geometry("600x500+300+100")

cv= Canvas(root, width = 600, height =500, bg = "white")

cv.pack()

image = Image.open('2.jpg')

im = ImageTk.PhotoImage(image)

cv.create_image(270,190,image = im)

def oppose():

tkinter.messagebox.showinfo(title='扎心了!', message='再考虑考虑吧,不要急着回答')

def agree():

tkinter.messagebox.showinfo( title="欧耶", message="我不同意咯!")

tkinter.messagebox.showinfo( title="欧耶", message="别再打扰我了!")

root.destroy()

def hesitate ():

tkinter.messagebox.showinfo(title='别纠结了', message='你完了,你妈让你嫁给我')

tkinter.messagebox.showinfo(title='别纠结了', message='你爸也是这么说的')

tkinter.messagebox.showinfo(title='别纠结了', message='你奶奶也让你嫁给我')

tkinter.messagebox.showinfo(title='别纠结了', message='你哥哥也同意了')

tkinter.messagebox.showinfo(title='别纠结了', message='你闺蜜说嫁给我没错')

tkinter.messagebox.showinfo(title='别纠结了', message='你爸说不同意就打你')

tkinter.messagebox.showinfo(title='别纠结了', message='掉水我先救你')

tkinter.messagebox.showinfo(title='别纠结了', message='孩子难产我保大')

tkinter.messagebox.showinfo(title='别纠结了', message='银行卡都给你')

tkinter.messagebox.showinfo(title='别纠结了', message='接受现实吧,我会对你好的')

def closeWindow():

tkinter.messagebox.showerror(title='未作回应',message='小姐姐,请不要逃避!')

return False

root.protocol('WM_DELETE_WINDOW', closeWindow)

output_label0 = Label(root,text ="实话告诉你吧", font =("仿宋", 16,"bold"))

cv.create_window(20, 20, anchor=NW, window= output_label0)

output_label1 = Label(root,text ="我喜欢你很久了", font =("仿宋", 16,"bold"))

cv.create_window(40, 70, anchor=NW, window= output_label1)

output_label2 = Label(root,text ="你看着办吧", font =("仿宋", 16,"bold"))

cv.create_window(50, 110, anchor=NW, window= output_label2)

Button1 = Button(root, text="同意", font =("仿宋", 16,"bold"),width=10,height=1,command = agree)

cv.create_window(110, 430, anchor=NW, window=Button1)

Button2 = Button(root,text='考虑一下', font =("仿宋", 16,"bold"),width=10,height=1,command = hesitate )

cv.create_window(260, 430, anchor=NW, window=Button2)

Button3 = Button(root,text='不同意', font =("仿宋", 16,"bold"),width=10,height=1,command = oppose)

cv.create_window(450, 430, anchor=NW, window=Button3)

root.mainloop()

3e3f9f7bc89a

image.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值