How do you get Python documentation in Texinfo Info format?

后端 未结 10 1263
眼角桃花
眼角桃花 2021-01-30 07:33

Since Python 2.6, it seems the documentation is in the new reStructuredText format, and it doesn\'t seem very easy to build a Texinfo Info file out of the box anymore.

I

10条回答
  •  猫巷女王i
    2021-01-30 07:58

    Another "workaround" is to execute pydoc as suggested by Nikokrock directly in Emacs:

    (defun pydoc (&optional arg)
      (interactive)
      (when (not (stringp arg))
        (setq arg (thing-at-point 'word)))
    
      (setq cmd (concat "pydoc " arg))
      (ad-activate-regexp "auto-compile-yes-or-no-p-always-yes")
      (shell-command cmd)
      (setq pydoc-buf (get-buffer "*Shell Command Output*"))
      (switch-to-buffer-other-window pydoc-buf)
      (python-mode)
      (ad-deactivate-regexp "auto-compile-yes-or-no-p-always-yes")
    )
    

提交回复
热议问题