แนะนำ Windows Terminal เพื่อการทดสอบ
ต้องใช้ VS Code เพื่อพัฒนาหรือการสร้าง
ต้องใช้ Python เวอร์ชัน 3.12.X หรือมากกว่า
สำหลับติดตั้ง Python 3.12 แบบด่วน
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex "&{$((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/Faelayis/CMRU-Lab-Learn/main/setup/install_python.ps1'))}"
Warning
อาจจะต้องสร้าง Python Environment ถ้าลงครั้งแรก
📂.vscode
├─📄launch.json
└─📄settings.json
launch.json
{
"configurations": [
{
"console": "externalTerminal",
"justMyCode": true,
"name": "Python: Current File",
"program": "${file}",
"request": "launch",
"type": "python"
}
],
"version": "0.2.0"
}
settings.json
{
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"isort.args": ["--profile", "black"],
"python.analysis.autoFormatStrings": true,
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
"python.createEnvironment.contentButton": "show",
"python.testing.autoTestDiscoverOnSaveEnabled": true
}
กด F5 ในไฟล์ที่ต้องการเพื่อทดสอบ
Note