mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 04:50:04 +08:00
15 lines
459 B
Python
15 lines
459 B
Python
|
import os
|
||
|
from xml.etree.ElementTree import *
|
||
|
|
||
|
def ReadClasspathFile(fn):
|
||
|
cp = []
|
||
|
for a in parse(fn).findall('classpathentry'):
|
||
|
kind = a.get('kind')
|
||
|
if kind == 'src' and 'output' in a.keys():
|
||
|
cp.append(os.path.abspath(a.get('output')))
|
||
|
elif kind == 'lib' and 'path' in a.keys():
|
||
|
cp.append(os.path.abspath(a.get('path')))
|
||
|
elif kind == 'output' and 'path' in a.keys():
|
||
|
cp.append(os.path.abspath(a.get('path')))
|
||
|
return cp
|