rope.py 文件源码

python
阅读 45 收藏 0 点赞 0 评论 0

项目:wuye.vim 作者: zhaoyingnan911 项目源码 文件源码
def update_python_path(paths):
    """ Update sys.path and make sure the new items come first. """
    old_sys_path_items = list(sys.path)

    for path in paths:
        # see if it is a site dir
        if path.find('site-packages') != -1:
            site.addsitedir(path)

        else:
            sys.path.insert(0, path)

    # Reorder sys.path so new directories at the front.
    new_sys_path_items = set(sys.path) - set(old_sys_path_items)
    sys.path = list(new_sys_path_items) + old_sys_path_items
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号