expanduser

    0热度

    1回答

    从How to get the home directory in Python?和How to find the real user home directory using python?,有可能找到用户的主目录中: import os os.path.expanduser('~/') 但会有一个机会,os.path.expanduser()无法找到任何东西,返回~/? 我问这个问题,因