简体   繁体   English

使用reStructuredText(使用Portable Python)的麻烦

[英]Troubles with reStructuredText (with Portable Python)

I'm trying to run rst2odt.py and rst2wordml.py with Matti Pastelli's example on a Windows XP 32-bit computer. 我试图在Windows XP 32位计算机上使用Matti Pastelli的示例运行rst2odt.pyrst2wordml.py The R step works well, then I get the files ascii-example.rst, ascii-example.rst and ascii-example.pdf. R步骤运行良好,然后我得到文件ascii-example.rst,ascii-example.rst和ascii-example.pdf。

With Portable Python 2.7.3.1 I get the following errors: 使用Portable Python 2.7.3.1,我收到以下错误: 2731

With Portable Python 3.2.1.1 I get the following errors: 使用Portable Python 3.2.1.1,我收到以下错误: 3211

I am almost ignorant about the Python language hence I totally don't know what to do. 我对Python语言几乎一无所知,因此我完全不知道该怎么做。

Not really an answer, but a couple of observations to look at 不是一个真正的答案,而是要看几个观察

It's difficult to tell but two things stand out - the error you're receiving for the 2.7.x version is that print was a statement in the 2.x and was changed to a function in the 3.x. 这很难说但是有两点突出 - 你在2.7.x版本中收到的错误是print是2.x中的一个声明,并且被改为3.x中的一个函数。 Hence, it doesn't accept parameters ergo the error. 因此,它不接受错误的参数。

In 2.x file and open were effectively the same thing, and in the 3.x series file was removed, which is another error. 在2.x fileopen中实际上是一样的东西,并且在3.x系列file被删除了,这是另一个错误。

As to your "image size not fully specified and PIL not installed" - you'll either need to look at the help for rst2ody to see if it can be specified, or install PIL (which is straightforward enough using pip or easy_install ). 至于你的“图像大小未完全指定且未安装PIL” - 你需要查看rst2ody的帮助以查看是否可以指定,或者安装PIL(使用pipeasy_install可以很简单)。

I'm afraid I don't have Portable Python, and although I could suggest some kludges, I'm hoping this at least gives you some pointers... 我担心我没有Portable Python,虽然我可以建议一些kludges,但我希望这至少能给你一些指示......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM