def get_terminal_title(editor):
    """
    Return the terminal title,
    e.g.: "filename.py (/directory) - Pyvim"
    """
    eb = editor.current_editor_buffer
    if eb is not None:
        return '%s - Pyvim' % (eb.location or '[New file]', )
    else:
        return 'Pyvim'