The standard library has a module pydoc which can be used for generating and viewing documentation. I suggest a command such as [prefix] pydoc <NAME> which calls pydoc.doc with the given name to show instant documentation. I feel like this could be useful when referring to a certain method when helping someone - here's an example with str.find:
>>> import io
>>> import pydoc
>>> out = io.StringIO()
>>> pydoc.doc('str.find', output=out)
>>> print(out.getvalue())
Python Library Documentation: method_descriptor in str
str.find = find(...)
S.find(sub[, start[, end]]) -> int
Return the lowest index in S where substring sub is found,
such that sub is contained within S[start:end]. Optional
arguments start and end are interpreted as in slice notation.
Return -1 on failure.
for "bigger" documentation such as help(dict), this generates quite the long output. It might be a good idea to truncate this or put it into a "pageable embed" (with reactions to move around). Also, I've yet to figure out if it's somehow possible to include a link to the official docs..
The standard library has a module
pydocwhich can be used for generating and viewing documentation. I suggest a command such as[prefix] pydoc <NAME>which callspydoc.docwith the given name to show instant documentation. I feel like this could be useful when referring to a certain method when helping someone - here's an example withstr.find:for "bigger" documentation such as
help(dict), this generates quite the long output. It might be a good idea to truncate this or put it into a "pageable embed" (with reactions to move around). Also, I've yet to figure out if it's somehow possible to include a link to the official docs..