python代码写错了怎么办_我的代码又错了

我的代码又出错了!伙计,我只是一直在弄…我以前的那个(修好了)

是herefrom Tkinter import *

def get_info(key):

pass#do more later

def create_new():

create = Toplevel(root)

create.title('Create A New Contact')

Label(create, text='Name: ').grid(row=0, sticky=W+E)

name = Entry(create, width=8).grid(row=1, sticky=W+E)

Label(create, text='Address(ex. 1111 Main St, MyCity, Anystate 12345): ', wrapLength=1).grid(row=2, sticky=W+E)

address = Entry(create, width=8).grid(row=3, sticky=W+E)

def access():

access_window = Toplevel(root)

access_window.title("Access a Contact")

Label(access_window, text="Enter a first name: ").grid(row=0, sticky=W+E)

access_key = Entry(access_window, width=8).grid(row=1, sticky=W+E)

Button(access_window, text="Submit", command=lambda: get_info(access_key.get('0.0', 'end-1c'))).grid(row=2, sticky='W+E')

root = Tk()

root.title('Address Book')

button1 = Button(root, text="Create New", command=create_new).grid(row=0, column=0)

button2 = Button(root, text=“Access Person”, command=access).grid(row=0, column=1)

这应该没什么错,但确实有。这不是一个错误,只是当我点击“创建新”按钮时,只有名称条目显示出来,其他的都不会显示。使用“访问人”按钮,它只显示“输入名称:”而没有输入。在

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值