finish ri_data module
change some ri_cmd to accompany with ri_data
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
import ri_widget
|
||||
import ri_tk
|
||||
import ri_seq
|
||||
from xml.dom import minidom
|
||||
import ri_data
|
||||
|
||||
import sys
|
||||
import getopt
|
||||
from xml.dom import minidom
|
||||
|
||||
def print_usages():
|
||||
print 'Usages: %s [-b|--begin] xml_file_name' %sys.argv[0]
|
||||
print 'Usages: %s [-b|--begin step_name] [interface_xml_file] [install_xml_file]' %sys.argv[0]
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "b:", ["begin=",])
|
||||
@@ -22,10 +23,19 @@ for opt, arg in opts:
|
||||
if opt in ('-b', '--begin'):
|
||||
begin_step = arg
|
||||
|
||||
if len(args):
|
||||
xmldoc = minidom.parse(args[0])
|
||||
if len(args) == 0:
|
||||
itf_xml = "../../xml/interface_t.xml"
|
||||
ins_xml = "../../xml/install.xml"
|
||||
elif len(args) == 1:
|
||||
itf_xml = args[0]
|
||||
ins_xml = "../../xml/install.xml"
|
||||
else:
|
||||
xmldoc = minidom.parse("../../xml/interface_t.xml")
|
||||
itf_xml = args[0]
|
||||
ins_xml = args[1]
|
||||
|
||||
xmldoc = minidom.parse(itf_xml)
|
||||
ri_data.install_xml = ins_xml
|
||||
ri_data.init_from_xml()
|
||||
|
||||
ri_widget.construct(xmldoc.firstChild)
|
||||
ri_seq.construct(xmldoc.firstChild)
|
||||
|
||||
Reference in New Issue
Block a user