读取某个目录下的文件,如'/Users/test/test_kmls'目录下有test1.txt.test2.txt. 第一种方法读出的all_files是test1.txt.test2.txt import os kml_path=os.path.abspath('/Users/test/test_kmls') all_files=os.listdir(kml_path) for file in all_files: print file 第二种方法可以获得文件的全路径,读出的all_file…
文章来源:http://www.cnblogs.com/xfiver/archive/2010/07/07/1772764.html 1. IOException parsing XML document from ServletContext resource [/WEB-INF/classes/beans.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resour…