dottednamesolver和其他从pyramid.path中提取的内容

dotted_name_resolver的Python项目详细描述


python_dotted_name_解析器

Build StatusLatest Version

DottedNameResolver 还有其他的东西 pyramid.path 从美妙的 Pyramid网页 框架。

几个使用

的快速示例
In[1]:fromdotted_name_resolverimportDottedNameResolverIn[2]:r=DottedNameResolver()In[3]:r.resolve('os.path')Out[3]:<module'posixpath'from'/Users/marca/python/virtualenvs/dotted_name_resolver/lib/python2.7/posixpath.pyc'>In[4]:r.resolve('os.path.exists')Out[4]:<functiongenericpath.exists>In[5]:r.resolve('dotted_name_resolver.DottedNameResolver.maybe_resolve')Out[5]:<unboundmethodDottedNameResolver.maybe_resolve>In[6]:importos.pathIn[7]:r.resolve(os.path.exists)---------------------------------------------------------------------------ValueErrorTraceback(mostrecentcalllast)<ipython-input-9-0fd311498cae>in<module>()---->1r.resolve(os.path.exists)/Users/marca/dev/git-repos/python_dotted_name_resolver/dotted_name_resolver/__init__.pycinresolve(self,dotted)328ifnotisinstance(dotted,string_types):-->329raiseValueError('%r is not a string'%(dotted,))330package=self.package331ifpackageisCALLER_PACKAGE:ValueError:<functionexistsat0x1002a5398>isnotastringIn[8]:r.maybe_resolve(os.path.exists)Out[8]:<functiongenericpath.exists>In[24]:fromdotted_name_resolverimportAssetResolverIn[25]:a=AssetResolver('IPython')In[26]:a.resolve('html/static/notebook/js/notebook.js').abspath()Out[26]:'/Users/marca/python/virtualenvs/dotted_name_resolver/lib/python2.7/site-packages/IPython/html/static/notebook/js/notebook.js'

文件

有关详细文档,请参见the documentation for pyramid.path和 用dotted_name_resolver替换任何表示pyramid.path的内容。

支持的python版本

$ /Library/Frameworks/Python.framework/Versions/3.3/bin/tox
...
  py26: commands succeeded
  py27: commands succeeded
  py33: commands succeeded
  py34: commands succeeded
  pypy: commands succeeded
  congratulations :)

0.1

0.0

  • 初始版本

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在没有代码气味的情况下编写遵循Liskov替代和其他可靠原则的不可变映射?   java最新jre上的压缩字符串对旧编译代码有好处吗?   java是否可以在javascript中取消PrimeFaces menuitem onclick函数   mysql从SQL数据库中访问java中xml名称空间标记的值   从java程序打开excel文件   java在方法中使用“var”是否会使执行(并发)线程不安全?   java使搜索视图以一种关于AndroidManifest的通用方式可用。xml   java对如何准确使用正则表达式感到困惑?   mule如何访问java文件中的记录变量   java在从2D数组引发异常后继续   枚举当前设置为的java值   java当listview只有几个项目时,如何使alert对话框显示listview的所有项目?   java getTableRow()返回大于项大小的索引   c用java传输二进制文件(数据)   java更改多选列表项复选框颜色