def __on_save(self):
    NoWatchItem = len(self.tensor_watch_list)
    watchlist = ([None] * NoWatchItem)
    root = ET.Element('root')
    for i in range(NoWatchItem):
        watchlist[i] = ET.SubElement(root, ('Item' + str((i + 1))))
        name = ET.SubElement(watchlist[i], 'name')
        shape = ET.SubElement(watchlist[i], 'shape')
        reshape = ET.SubElement(watchlist[i], 'reshape')
        visType = ET.SubElement(watchlist[i], 'visType')
        win_x = ET.SubElement(watchlist[i], 'win_x')
        win_y = ET.SubElement(watchlist[i], 'win_y')
        win_w = ET.SubElement(watchlist[i], 'win_w')
        win_h = ET.SubElement(watchlist[i], 'win_h')
        name.text = self.tensor_watch_list[i].name
        shape.text = self.tensor_watch_list[i].shape_str
        reshape.text = self.tensor_watch_list[i].reshape
        visType.text = self.tensor_watch_list[i].picDIM
        (x, y, w, h) = self.pyqt_env.get_win_pos_size(self.tensor_watch_list[i].pyqt_window_id)
        win_x.text = str(x)
        win_y.text = str(y)
        win_w.text = str(w)
        win_h.text = str(h)
    my = ET.tostring(root)
    myfile = open('Saved_WatchList.xml', 'wb')
    myfile.write(my)
def __on_save(self):
    NoWatchItem = len(self.tensor_watch_list)
    watchlist = ([None] * NoWatchItem)
    root = ET.Element('root')
    for i in range(NoWatchItem):
        watchlist[i] = ET.SubElement(root, ('Item' + str((i + 1))))
        name = ET.SubElement(watchlist[i], 'name')
        shape = ET.SubElement(watchlist[i], 'shape')
        reshape = ET.SubElement(watchlist[i], 'reshape')
        visType = ET.SubElement(watchlist[i], 'visType')
        win_x = ET.SubElement(watchlist[i], 'win_x')
        win_y = ET.SubElement(watchlist[i], 'win_y')
        win_w = ET.SubElement(watchlist[i], 'win_w')
        win_h = ET.SubElement(watchlist[i], 'win_h')
        name.text = self.tensor_watch_list[i].name
        shape.text = self.tensor_watch_list[i].shape_str
        reshape.text = self.tensor_watch_list[i].reshape
        visType.text = self.tensor_watch_list[i].picDIM
        (x, y, w, h) = self.pyqt_env.get_win_pos_size(self.tensor_watch_list[i].pyqt_window_id)
        win_x.text = str(x)
        win_y.text = str(y)
        win_w.text = str(w)
        win_h.text = str(h)
    my = ET.tostring(root)
    myfile = open('Saved_WatchList.xml', 'wb')
    myfile.write(my)