실행 환경
- Windows 10 python 3.8.3
- openwrt 18.06 python 3.8.3
- ubuntu 20.04 python 3.8.2
os 별 실행 결과
- os.name
- import os
print(os.name) - Windows 10
- nt
- openwrt 18.06, ubuntu 20.04
- posix
- sys.platform
- import sys
print(sys.platform) - Windows 10
- win32
- openwrt 18.06, ubuntu 20.04
- linux
- platform.system()
- import platform
print(platform.system()) - Windows 10
- Windows
- openwrt 18.06, ubuntu 20.04
- Linux
- platform.uname()
- import platform
print(platform.uname())
print(platform.uname().system()) - Windows 10
- uname_result(system='Windows', node='DESKTOP-2N7390S', release='10', version='10.0.17763', machine='AMD64', processor='Intel64 Family 6 Model 158 Stepping 9, GenuineIntel')
Windows - openwrt 18.06
- uname_result(system='Linux', node='wizfi630s', release='4.14.111', version='#0 Tue Apr 9 20:25:11 2019', machine='mips', processor='')
Linux - ubuntu 20.04
- uname_result(system='Linux', node='sr-u20-vb', release=5.4.0-42-generic', version='#46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020', machine='x86_64', processor='x86_64')
Linux
'IT > python' 카테고리의 다른 글
[python] json dump/dumps/load/loads 구분하기 (0) | 2020.09.07 |
---|---|
[python] Popen 을 통해 dict 주고 받기 (0) | 2020.08.12 |
[python] 설치된 패키지 확인 (0) | 2020.07.29 |
[python] 서로 다른 경로에 있는 모듈 import 하기 (0) | 2020.07.22 |
[python][ubus] 간단히 ubus 보내고 받는 예제 (0) | 2020.07.02 |