How do I provide inline input to an IPython (notebook) shell command?
问题 I want to put together an IPython notebook with some shell commands and their input. In the bash prompt I can use "here-document" syntax: bash-3.2$ mysql -u root <<END_IPUT > use mydb; > show tables; > END_INPUT How do I get the same effect in IPython, and specifically in a jupyter notebook? I know how to execute shell commands as IPython as "line magics" or "cell magics", e.g.: In [7]: !! ls -tF Out[7]: ['Demo-notebook.ipynb', 'createdb.sql', ... I've looked at IPython as a system shell,