当前位置:网站首页>if _name_ == “__main__“:NameError: name ‘_name_‘ is not defined
if _name_ == “__main__“:NameError: name ‘_name_‘ is not defined
2022-08-03 20:21:00 【夜色的繁星】
今天打算重新学一下pyqt5 ,遇到了一个错误;后来发现原来需要name哪里是两个斜杠
if _name_ == "__main__":
NameError: name '_name_' is not definedimport sys
from PyQt5.QtWidgets import QApplication,QLabel
if __name__ == "__main__":
app = QApplication(sys.argv)
label = QLabel("Hello Word")
label.show(app.exec_())
边栏推荐
猜你喜欢

Detailed AST abstract syntax tree

Advantages and Disadvantages of Blind and Buried Via PCB Stacked Via Design

In-depth understanding of JVM-memory structure

ThreadLocal详解

How can a cloud server safely use local AD/LDAP?
[email protected] 610/[email protected] 594/Alexa 56"/>染料修饰核酸RNA|[email protected] 610/[email protected] 594/Alexa 56

高并发,你真的理解透彻了吗?

RNA-ATTO 390|RNA-ATTO 425|RNA-ATTO 465|RNA-ATTO 488|RNA-ATTO 495|RNA-ATTO 520近红外荧光染料标记核糖核酸RNA

Abs (), fabs () and LABS ()

亚马逊云科技 Build On 2022 - AIot 第二季物联网专场实验心得
随机推荐
leetcode 461. 汉明距离
Detailed demonstration pytorch framework implementations old photo repair (GPU)
Leetcode 16. Numerical integral power (power + fast recursive/iteration)
alicloud3搭建wordpress
谁的孙子最多II
leetcode refers to Offer 58 - II. Left Rotate String
【微信小程序2】事件传参与数据同步[03]
面试官:为什么 0.1 + 0.2 == 0.300000004?
async 和 await 原来这么简单
JWT详解
pytorch框架实现老照片修复功能详细演示(GPU版)
直播平台怎么搭建,针对输入框的各种组件
双线性插值公式推导及Matlab实现
模板字符串概述
算法--交错字符串(Kotlin)
简单又有效的基本折线图制作方法
详解AST抽象语法树
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
Go语言为任意类型添加方法
Power button 206 - reverse list - the list