python 获取linux的家目录

import os

home_path = os.environ["HOME"]
原文地址:https://www.cnblogs.com/tarzen213/p/13591101.html