Python error Using deprecated class Pysimpleapp solution

Source: Internet
Author: User

Today, when doing the Python script exercise, because it is to copy the online code to learn, run the script when you encounter Python prompts the following line error code:


wxpydeprecationwarning: Using deprecated class Pysimpleapp.


The solution is also very simple, is to put the countdown to the following lines in the code of the WX. Pysimpleapp () replaced by

app = wx. APP () or wx. APP (False) .


if __name__ = = ' __main__ ':
app = wx. APP ()
#app = wx. Pysimpleapp ()


frame = Refactorexample (Parent=none, Id=-1)
Frame. Show ()
App. Mainloop ()

650) this.width=650; "title=" Capture 2. JPG "src=" http://s3.51cto.com/wyfs02/M01/58/B2/wKiom1S4c8qgWEFLAATS39CNSM4744.jpg "alt=" Wkiom1s4c8qgweflaats39cnsm4744.jpg "/>


This article from "Galaxy its Lin" blog, reproduced please contact the author!

Python error Using deprecated class Pysimpleapp solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.