<확인할 정보> 운영체제 종류: 버전: 설치날짜: CPU 이름: 코어 수: BIOS 제조사: 전체 메모리 용량:
입력 시 나온 코드
[Chat GPT 전체 코드 - 컴퓨터 기본정보 확인] .
import platform
import os
import psutil
# 운영체제 종류 및 버전
os_type = platform.system()
os_version = platform.version()
# 설치 날짜
# 윈도우의 경우
if os_type == "Windows":
install_date_cmd = os.popen('systeminfo | findstr /C:"Original Install Date"').read().strip()
install_date = install_date_cmd.split(":", 1)[1].strip() if ":" in install_date_cmd else "N/A"
# CPU 정보
cpu_name = platform.processor()
cpu_cores = psutil.cpu_count(logical=False) # 물리 코어 수
# BIOS 제조사 (윈도우 전용, 다른 OS에서는 다른 방식이 필요할 수 있음)
bios_vendor = "N/A"
if os_type == "Windows":
bios_info = os.popen('wmic bios get Manufacturer').read().strip()
bios_vendor = bios_info.split('\n')[1] if len(bios_info.split('\n')) > 1 else "N/A"
# 전체 메모리 용량
total_memory_gb = psutil.virtual_memory().total / (1024 ** 3) # GB 단위
print(f"운영체제 종류: {os_type}")
print(f"버전: {os_version}")
print(f"설치날짜: {install_date}")
print(f"CPU 이름: {cpu_name}")
print(f"코어 수: {cpu_cores}")
print(f"BIOS 제조사: {bios_vendor}")
print(f"전체 메모리 용량: {total_memory_gb:.2f} GB")