import gtk
import uuid


def gtk_wait(wait_duration_s):
    gtk.main_iteration_do()


def generate_plugin_name(prefix='plugin-'):
    '''
    Generate unique plugin name.
    '''
    return prefix + str(uuid.uuid4()).split('-')[0]

from pygtkhelpers.utils import refresh_gui
import uuid


def gtk_wait(wait_duration_s):
    refresh_gui()


def generate_plugin_name(prefix='plugin-'):
    '''
    Generate unique plugin name.
    '''
    return prefix + str(uuid.uuid4()).split('-')[0]

Use pygtkhelpers refresh_gui in gtk_wait
Use pygtkhelpers refresh_gui in gtk_wait

- import gtk
+ from pygtkhelpers.utils import refresh_gui
  import uuid
  
  
  def gtk_wait(wait_duration_s):
-     gtk.main_iteration_do()
+     refresh_gui()
  
  
  def generate_plugin_name(prefix='plugin-'):
      '''
      Generate unique plugin name.
      '''
      return prefix + str(uuid.uuid4()).split('-')[0]
  
Use pygtkhelpers refresh_gui in gtk_wait
## Code Before:
import gtk
import uuid


def gtk_wait(wait_duration_s):
    gtk.main_iteration_do()


def generate_plugin_name(prefix='plugin-'):
    '''
    Generate unique plugin name.
    '''
    return prefix + str(uuid.uuid4()).split('-')[0]

## Instruction:
Use pygtkhelpers refresh_gui in gtk_wait
## Code After:
from pygtkhelpers.utils import refresh_gui
import uuid


def gtk_wait(wait_duration_s):
    refresh_gui()


def generate_plugin_name(prefix='plugin-'):
    '''
    Generate unique plugin name.
    '''
    return prefix + str(uuid.uuid4()).split('-')[0]
