Steven D'Aprano wrote:

location = '/Users/spyros/Desktop/3NY8MODELSHUMAN/HomologyModels/'
zdata = []
for filename in os.listdir(location):
    zdata.extend(get_zcoords(filename))


Hah, that can't work. listdir returns the name of the file, but not the file's path, which means that Python will only look in the current directory. You need something like this:

location = '/Users/spyros/Desktop/3NY8MODELSHUMAN/HomologyModels/'
zdata = []
for filename in os.listdir(location):
    zdata.extend(get_zcoords(os.path.join(location, filename)))


Sorry about that.



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to