import os
def test_path(in_path,sep=';'):
pl=in_path.split(sep)
there=[]
not_there=[]
for t in pl:
if len(t) > 1:
if os.path.isfile(t):
there.append(t)
else:
not_there.append(t)
print "These exist"
for i,t in enumerate(there):
print "%d %s" % (i+1,t)
print "\nThese are missing:"
for i, t in enumerate(not_there):
print "%d %s" % (i+1,t)
No comments:
Post a Comment