簡體   English   中英

將OrgMode中的Python輸出解析為表

[英]Parse Python Output in OrgMode to a table

我現在嘗試了一個小時,但沒有得到預期的結果,所以我需要在這里問您:

  • 我已經安裝了Emacs 24
  • 我已經安裝了Python 3.0

實際上,我嘗試通過orgmode將python輸出解析為表:

#+begin_src python :session :results output table :exports results
print("|Example|")
print("|--------|")
print("|One example entry|")
#+end_src

當我將緩沖區導出到pdf / html時,我希望有一張表。

但是,這不會發生。

誰能修復我的代碼並告訴我,為什么我的代碼不起作用?

提前致謝!

raw添加到您的:results標頭參數中:

#+begin_src python :session :results output table raw :exports results
print("|Example|")
print("|--------|")
print("|One example entry|")
#+end_src

文檔中

raw結果被解釋為原始Org模式代碼,並直接插入到緩沖區中。 如果結果看起來像一張桌子,它們將按組織模式進行對齊。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM