def open_from_file(self,file_name):
        with open(file_name, 'rb') as handle:
            b = pickle.load(handle)


        for i in range(len(b)):
            data = b[i]
            print(data)

            if isinstance(data[0],str):            # means image
                pos = data[2][1:-1]
                pos = pos.split(",")
                x = pos[0].strip()
                x= x
                y = pos[1].strip()
                y = y

                img = self.base(source=data[0],width=400, size_hint_y=None,size_hint_x=None, height=400, pos=(x,y))
                o = ImageProcessing(img,data[1])

                o.bydefaultrotation()
                self.where_to_add.container.add_widget(img, -1)



            else:                                       # means wire

                #print(data)
                item = data[3]
                k = self.wirebase()
                if 1==1:
                    tobeadded = self.dic[item]()

                    tobeadded.topmost.width = data[0]
                    tobeadded.topmost.height = data[1]

                    pos = data[4][1:-1]
                    pos = pos.split(",")
                    x = pos[0].strip()
                    x = x
                    y = pos[1].strip()
                    y = y

                    for j in tobeadded.topmost.children:
                        for u in j.children:
                            if isinstance(u, self.DraggableWire):
                                # u.actualwire.canvas.before.children[0].rgba = data[2]
                                u.children[0].canvas.before.children[0].rgba=data[2]



                    tobeadded.topmost.pos = (x,y)

                    k.external_container.add_widget(tobeadded)

                self.where_to_add.container.add_widget(k, 0)