Is your feature request related to a problem? Please describe.
Following #1 and #2, it would be nice if we could integrate the output of Python code directly within the source itself, most commonly at the end.
Describe the solution you'd like
An integrated-above (or concat?) option for the show_source configuration. Basically: output = code_block("python", source_block + "\n" + output).
It would allow this:
def func(name):
"""Return "hello" plus name.
Example:
```pycon exec="yes" show_source="integrated-above" capture="out"
>>> from module import func
>>> print(func("Steve"))
Is your feature request related to a problem? Please describe. Following #1 and #2, it would be nice if we could integrate the output of Python code directly within the source itself, most commonly at the end.
Describe the solution you'd like An
integrated-above
(orconcat
?) option for theshow_source
configuration. Basically:output = code_block("python", source_block + "\n" + output)
.It would allow this: