string function to method in gtk/em.py