首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python + rope:设置被忽略的资源模式?

Python + rope:设置被忽略的资源模式?
EN

Stack Overflow用户
提问于 2017-08-17 22:15:48
回答 2查看 387关注 0票数 0

绳索文件说:

每个项目都有一组被忽略的资源模式。

但它没有提到如何配置这个列表。

如何为项目配置被忽略的资源列表?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-08-21 21:14:12

~/.ropeproject/config.py中有一个ignored_resources设置,它看起来很有用:

代码语言:javascript
复制
# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs.  Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match all characters but slashes.
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
# '.svn': matches 'pkg/.svn' and all of its children
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',
                              '.hg', '.svn', '_svn', '.git', '.tox']
票数 1
EN

Stack Overflow用户

发布于 2017-08-19 19:40:49

每个项目都有一个隐藏的子目录.ropeproject/。看看那里的config.py文件。这份文件有很好的记录。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45745720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档