linux/cmd中python路径导入ModuleNotFoundError: No module named 'xxx' import osimport syscurPath = os.path.abspath(os.path.dirname(__file__))rootPath = os.path.split(curPath)[0]print(rootPath)sys.path.append(os.path.split(rootPath)[0]) from sendWeatherEma
用Python读取文件夹, 然后打开文件 下面读取到文件的每一个内容, 然后加上路径 import os path = r'../Downloads/text/content' for filename in os.listdir(path): print(os.path.join(path,filename))