def METHOD_NAME(c):
    d = g.app.gui.runOpenDirectoryDialog(
        title='Select a directory',
        startdir=os.curdir)
    if d:
        w = c.frame.body.wrapper
        ins = w.getInsertPoint()
        w.insert(ins, d)
        # w.event_generate('<Key>')
        # w.update_idletasks()