'Create a Rope project on a desired path'

def create_rope_project(self, root_path):

    if PY2:
        root_path = encoding.to_fs_from_unicode(root_path)
    else:
        pass
    try:
        import rope.base.project
        self.project = rope.base.project.Project(root_path, **ROPE_PREFS)
    except ImportError:
        print >>STDERR, 'project    error'
        self.project = None
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, ('create_rope_project:    %r' % root_path))
    except TypeError:
        self.project = None
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, ('create_rope_project:    %r' % root_path))
    self.validate()
