コード例 #1
0
 def ok_file(self, button, filesel):
     path = filesel.get_filename()
     mdpath = join(dirname(path), 'machine_database.xml')
     action = filesel.get_data('action')
     filesel.destroy()
     dir = dirname(path)
     dbm = DatabaseManager(self.conn)
     if action == 'backup':
         dbm.backup(dir)
     elif action == 'restore':
         dbm.restore(dir)