当前位置:网站首页>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_())
边栏推荐
- 嵌入式分享合集27
- Leetcode 899. An orderly queue
- 极验深知v2分析
- 华为设备配置VRRP负载分担
- Leetcode sword refers to Offer 15. 1 in the binary number
- LeetCode 1374. 生成每种字符都是奇数个的字符串
- Power button - 203 - remove the list elements linked list
- charles配置客户端请求全部不走缓存
- leetcode 1837. The sum of the digits in the K-base representation
- Lecture topics and guest blockbuster, TDengine developers conference to promote data technology "broken"
猜你喜欢
随机推荐
wordpress建立数据库连接时出错
LeetCode 899. 有序队列
倒计时2天,“文化数字化战略新型基础设施暨文化艺术链生态建设发布会”启幕在即
【STM32】标准库-自定义BootLoader
ThreadLocal详解
谁的孙子最多II
转运RNA(tRNA)甲基化修饰7-甲基胞嘧啶(m7C)|tRNA-m7G
5 款漏洞扫描工具:实用、强力、全面(含开源)
力扣203-移除链表元素——链表
RNA核糖核酸修饰荧光染料|HiLyte Fluor 488/555/594/647/680/750标记RNA核糖核酸
leetcode 268. Missing Numbers (XOR!!)
leetcode 326. 3 的幂
Detailed explanation of JWT
How can a cloud server safely use local AD/LDAP?
leetcode 16.01. Swap numbers (swap the values of 2 numbers without using temporary variables)
李沐动手学深度学习V2-BERT微调和代码实现
ES6-箭头函数
Go语言为任意类型添加方法
JWT详解
染料修饰核酸RNA|[email protected] 610/[email protected] 594/Alexa 56









![【微信小程序2】事件传参与数据同步[03]](/img/d9/73004e6edf800c583231a94dfbd878.png)