我有以下目录和其中包含txfiles的子目录。我想访问它们来阅读这些行。但这不起作用。你能帮助我吗? 主目录:2009年 子目录:电影,专辑,歌曲 这些目录中包含的文本文件。 我想通过这些文本的每一行读取文件 我的伪代码folllows x = os.listdir("2009")
现在,x是的[电影,专辑,歌曲] for el in x:
os.system("ls 2009/el
我设计使用pythonqt的接口,当我尝试使用os.system,接口冻结打电话给我的程序。 def pairClicked(self,exp1,exp2):
os.system("""cd kat
./run -v pair""") #in the terminal i used to call my python interface, it runs this c