向后兼容的代理模块
etsprox的Python项目详细描述
这是ets代理包,它包含allets的代理模块 将旧的热情名称空间导入(版本3)映射到 命名空间重构ETS包(版本4)。例如:
from enthought.traits.api import HasTraits
现在只是:
from traits.api import HasTraits
为了方便起见,这个包还包含一个重构工具来转换 投影到新的命名空间(这样就不依赖于代理):
$ ets3to4 -h usage: ets3to4 DIRECTORY This utility, can be used to convert projects from ETS version 3 to 4. It simply replaces old namespace strings (e.g. 'enthought.traits.api') to new ones (e.g. 'traits.api'), in all Python files in DIRECTORY recursively. Once the conversion of your project is complete, the etsproxy module should no longer be necessary. However, this tool is very simple and does not catch all corner cases.
这个模块将在将来被删除,并且是旧式的(enthough.xxx) 应(随着时间)将导入转换为新导入。