【发布时间】:2011-09-26 22:54:59
【问题描述】:
我目前正在使用服务器。我创建了自己的目录,但需要访问服务器上不同目录中的文件。基本上,我的代码需要访问位于服务器上另一个目录中的文件,但我不知道如何去做。我的代码中是否有可以添加的命令,或者我可以在命令行中输入什么内容?我在代码中遇到的错误如下所示:
[aburac1][mcbbigram][/ruths/data/aburac1] python get-contribs.py
Traceback (most recent call last):
File "get-contribs.py", line 96, in <module>
fec_files = filter(lambda x: x.endswith('.fec'),os.listdir(dname))
OSError: [Errno 2] No such file or directory: '1001015'
文件 1001015 位于目录 /ruths/data/fec/efr 中。那么如何从我的目录中访问这些文件呢?
【问题讨论】: