我对Python还不熟悉。我正在尝试运行PyRTF的this示例。我可以导入PyRTF(我已经安装了PyRTF3
),但是我不能调用PyRTF中的任何模块,即Document()
,Renderer()
。我在Python文件夹中找到了模块文件和PyRTF,所以我知道它们存在。你知道吗
我从examples2.py
中的第48行得到错误消息:
if __name__ == '__main__' :
DR = Renderer()
doc1 = MakeExample1()
DR.Write( doc1, OpenFile( 'Image1' ) )
print("Finished")
NameError: name 'Renderer' is not defined
编辑:我发现这个模块只与Python2.7兼容,但他们还是把它推到了3.x版本。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐