使用os模块获取当前工作目录: 123456 import osprint(os.getcwd()) print(os.path.abspath('.')) print(os.path.abspath('..')) # 获得当前工作目录的父目录print(os.path.abspath(os.curdir)) 赞微海报分享
近期评论