首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从jython访问winreg

从jython访问winreg
EN

Stack Overflow用户
提问于 2015-06-08 12:01:18
回答 1查看 576关注 0票数 1

为什么不能从_winreg访问jython模块

代码语言:javascript
复制
c:\>python  
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.  
import _winreg  

c:\>jython  
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_31
Type "help", "copyright", "credits" or "license" for more information.  
import _winreg  
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named _winreg
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-06-08 15:39:19

_winreg在Jython中不可用。

在CPython on _winreg中,_winreg是一个内置模块(镜像底层Windows ),被编译到_winreg解释器中。这可以通过检查sys.builtin_module_names属性来验证。

另见winreg

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

https://stackoverflow.com/questions/30708641

复制
相关文章

相似问题

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