search

Home  >  Q&A  >  body text

python图形用户界面程序设计

这里是一个渴求知识的编程小白。。
今天刚接触图形用户界面程序设计,我下载了wxPython,拷贝了一段代码想试试,结果运行不出来。
英文我都看得懂,但是因为GUI对我是个新概念,所以我不太懂问题出在哪里……
感恩!

报错图片

代码主体

高洛峰高洛峰2889 days ago409

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 09:21:19

    if __name__ == '__main__':

    There should be two underscores here
    and the __init__ above, these are special methods of python

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:21:19

    line3: _init_      --> __init__
    line12: _name_     --> __name__
            _main_     --> __main__

    reply
    0
  • Cancelreply