我正在尝试转换一个名为“PyOPC”的Python2库
但它是巨大的。我使用“2to3库”转换了所有语法。我还替换了一些进口产品,如
删除from expectations import Exceptions
替换了这个
import types as _types
_inttypes = [ _types.IntType, _types.LongType ]
_floattypes = [ _types.FloatType ]
_seqtypes = [ _types.TupleType, _types.ListType ]
_stringtypes = [ _types.StringType, _types.UnicodeType ]
用这个
_inttypes = [ int ]
_floattypes = [ float ]
_seqtypes = [ tuple,list ]
_stringtypes = [ str ]
将from UserDict import UserDict
替换为from collections import UserDict
还有很多变化。但我怀疑上述变化可能导致了这个问题。以上更改是否正确?有什么简单的方法可以从Python2切换到Python3吗
我找不到任何用于python3的OPC库。只有OpenOPC
可用。但不支持使用用户名&;连接;密码
目前没有回答
相关问题 更多 >
编程相关推荐