python 判断系统类型
python 查看系统类型
# -*- coding: utf-8 -*-
import platform
from logger import logger
def is_platform() -> str:
type = platform.system()
if type in ["Windows", "Linux", "Mac"]:
logger.info("this is {}".format(type))
else:
logger.info("others system: {}".format(type))
return type
if __name__ == '__main__':
is_platform()