【发布时间】:2013-05-04 03:25:43
【问题描述】:
我正在尝试执行一些地理处理。我的任务是在一个目录中找到所有 shapefile,然后在该目录中找到该 shapefile 的完整路径名。我可以获取 shapefile 的名称,但我不知道如何获取该 shapefile 的完整路径名。
shpfiles = []
for path, subdirs, files in os.walk(path):
for x in files:
if x.endswith(".shp") == True:
shpfiles.append[x]
【问题讨论】: