今天我写了一个代码,无法执行,希望大家帮帮我,系统是 win10,目的:整蛊朋友
import wx
class MyFarm(wx.Frame):
def __int__(self,parent,id):
wx.Frame.__int__(self,parent,id,title="滑稽",
pos=(0,0),size=(1366,768))
panel=wx.Panel(self)
title=wx.StaticText(panel,label='看来你还真点了',pos=(100,20))
font=wx.Font(16,wx.default,wx.FONTSTYLE_NORMAL,wx.NORMAL)
wx.StaticText(panel,label="滑稽",pos=(50,50))
wx.StaticText(panel,label="滑稽",pos=(50,70))
wx.StaticText(panel,label="滑稽",pos=(50,90))
wx.StaticText(panel,label="滑稽",pos=(50,110))
wx.StaticText(panel,label="滑稽",pos=(50,130))
wx.StaticText(panel,label="滑稽",pos=(50,170))
wx.StaticText(panel,label="滑稽",pos=(50,190))
wx.StaticText(panel,label="滑稽",pos=(50,210))
wx.StaticText(panel,label="滑稽",pos=(50,230))
wx.StaticText(panel,label="滑稽",pos=(50,250))
wx.StaticText(panel,label="滑稽",pos=(50,280))
wx.StaticText(panel,label="滑稽",pos=(50,310))
wx.StaticText(panel,label="滑稽",pos=(50,330))
wx.StaticText(panel,label="滑稽",pos=(50,350))
wx.StaticText(panel,label="滑稽",pos=(50,370))
wx.StaticText(panel,label="滑稽",pos=(50,390))
wx.StaticText(panel,label="滑稽",pos=(50,410))
wx.StaticText(panel,label="滑稽",pos=(50,430))
wx.StaticText(panel,label="滑稽",pos=(50,450))
wx.StaticText(panel,label="滑稽",pos=(50,470))
if __name__=='__main__':
app=wx.App()
frame=MyFarm(parent=None,id=1)
frame.Show()
app.MainLoop()
if判断句放错位置了
正确代码: