![](/img/trans.png)
[英]Emacs org-mode Python source blocks don't export with python-mode.el
[英]How to export only the python output not source code to ODT from emacs org-mode?
我在emacs组织模式下有python源代码。 我只想将python代码的输出导出到ODT,而不是源代码。 我该怎么办?
这是我的测试代码。 导出时,只有ODT文件中的源代码。
#+BEGIN_SRC python :results output :export result
import pprint
test_dict = {
'a':1,
'b':2,
'c':3,
"nested": {
"n_a":1,
"n_b":2,
"n_c":3
}
}
pprint.pprint(test_dict, indent=2, width=1)
#+END_SRC
#+RESULTS:
: { 'a': 1,
: 'b': 2,
: 'c': 3,
: 'nested': { 'n_a': 1,
: 'n_b': 2,
: 'n_c': 3}}
您需要将:exports
标头设置为results
。 这是描述标题的org-mode
的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.