blob: d4c41afb13992b5efac1148ce1a14d9cd342730e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import os
def path(f):
for d in os.listdir(f):
try:
for s in os.listdir(os.path.join(f, d)):
if s.endswith('.xml'):
return os.path.join(f, d)
except:
pass
return None
if __name__ == '__main__':
print path('/home/carl/Unsafe/DCP/Boon')
|