Skip to content

Latest commit

 

History

History

COM-1305

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

COM 1305 การเขียนโปรแกรมภาษาคอมพิวเตอร์

การพัฒนา

แนะนำ Windows Terminal เพื่อการทดสอบ
ต้องใช้ VS Code เพื่อพัฒนาหรือการสร้าง
ต้องใช้ Python เวอร์ชัน 3.12.X หรือมากกว่า

ส่วนขยาย

Windows

สำหลับติดตั้ง 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 ในไฟล์ที่ต้องการเพื่อทดสอบ