forked from byte-zhang/croscan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetting.py
More file actions
19 lines (17 loc) · 751 Bytes
/
setting.py
File metadata and controls
19 lines (17 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#coding = utf-8
from SimpleXMLRPCServer import SimpleXMLRPCServer
#from xml.dom import minidom
from xml.etree.ElementTree import ElementTree
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import SubElement
from xml.etree.ElementTree import dump
from xml.etree.ElementTree import Comment
from xml.etree.ElementTree import tostring
def load_scanner_config( cfg_file, i ):
name = "scanner%d" % i
scanner_name = ElementTree(file=cfg_file).getroot().find('%s/name'%name).text
cmdline = ElementTree(file=cfg_file).getroot().find('%s/cmdline'%name).text
flush = ElementTree(file=cfg_file).getroot().find('%s/flush'%name).text
return scanner_name, cmdline, int(flush)
if __name__ == "__main__":
pass