繁体   English   中英

如何仅将python输出而不是源代码从emacs org-mode导出到ODT?

[英]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.

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