Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import xml.dom.minidom
- spisok =[]
- for root, dirs, files in os.walk("////app2.stop.ru//defaultVars//Vars//Connections"):
- for file in files:
- if file.endswith(".substvar"):
- path = os.path.join(root, file)
- spisok.append(path)
- for element in spisok:
- doc = xml.dom.minidom.parse(element)
- data ={}
- for info in doc.getElementsByTagName("globalVariable"):
- name = str(info.getElementsByTagName("name")[0].firstChild.data)
- value = str(info.getElementsByTagName("value")[0].firstChild.data)
- data[name]=value
- print(element,"n",data,"n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement