def exec_prompt_glib(bus, prompt):
 from gi.repository import GLib
 loop = GLib.MainLoop()
 result = []
 def callback(dismissed, unlocked):
  result.append(dismissed)
  result.append(unlocked)
  loop.quit()
 exec_prompt(bus, prompt, callback)
 loop.run()
 return (result[0], result[1])

def exec_prompt_glib ( bus , prompt ) : from gi . repository import GLib loop = GLib . MainLoop ( ) result = [ ] def callback ( dismissed , unlocked ) : result . append ( dismissed ) result . append ( unlocked ) loop . quit ( ) exec_prompt ( bus , prompt , callback ) loop . run ( ) return ( result [ 0 ] , result [ 1 ] )
like :func:exec_prompt .