示例#1
0
def chug():
    """Create a bunch of templates..."""
    import os
    import FactoryTalkXML as ftxml
    os.chdir('/Users/benmordecai/github/factorytalkxml/damo/')
    file1 = open('Diag Inputs 1.xml', 'r')
    dict1 = ftxml.populate(file1)
    file1.close()
    assert dict1 
    objex1 = ftxml.get_object_explorer(dict1)
    temp1a = create_template(objex1, INPUT_STATIC_NAMES)
    temp1b = create_template(objex1, INPUT_ITERABLE_NAMES)
    pickle_template(temp1a, temp1b, 'inputs.ftt')