1. Python簡(jiǎn)介
2. Python&PyQt5 開發(fā)環(huán)境搭建
- 安裝Python3
- 安裝PyQt5
- 配置環(huán)境變量 Path
C:\Users\Administrator\AppData\Local\Programs\Python\Python37;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\DLLs;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Lib\site-packages;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\Lib;C:\Users\Administrator\AppData\Local\Programs\Python\Python37\libs
ps: 以上根據(jù)自己安裝時(shí)路徑配置
3. Python IDE選擇及安裝
本人是初學(xué)者舵稠,對(duì)模塊名烙常、類名等不熟悉,為了能逐漸熟悉類名拼寫该编,故不希望使用自動(dòng)完成的IDE岛宦;so 選擇了Notepad++
4. 第一個(gè)Python程序 HelloWorld
- 使用NotePad++失尖,新建文件 "lesson1.py"
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication(sys.argv)
win = QWidget()
win.setWindowTitle("Hello World")
win.show()
sys.exit(app.exec_())
- 打開cmd窗口较剃,運(yùn)行
python lesson.py
附: PyQt5 類庫(kù)手冊(cè)
PyQt5.11以后眉孩,本地找不到doc目錄个绍,只好在線訪問(wèn)了
訪問(wèn)地址:https://www.riverbankcomputing.com/static/Docs/PyQt5/index.html