コード例 #1
0
ファイル: iso_sim.py プロジェクト: rkbalgi/python-scripts
def set_components(top):
    spec = Spec.get_spec('Iso8583 v0 - Test')
    top.title = top.title + ' - ' + spec.name
    spec_tree = ttk.Treeview(top, columns=('Field', 'Field Encoding', 'Field Value'), selectmode='browse')
    msg = spec.get_msg_by_name('Authorization Message - 0100')

    for field_def in msg.req_fields:
        print field_def.name
        spec_tree.insert('', 'end', field_def.name, text=field_def.name,
                         values=field_def.name + ',' + field_def.encoding)

    spec_tree.pack()