I’m new to this site, and to Jupyter/IPython, and since this might be more of a question about Python, I’m not sure I’m in the right place. But work colleagues suggested this is a good place to start with technical questions, so I’m happy for any tips or suggestions you might have for me.
I’m trying to allow my notebook environment to run executable scripts in my PATH in cells. This is easy enough when I have a single command (eg, ‘df -h .’) in a cell, and even works fine with multiple commands on a single line (eg, ‘df -h . ; pwd’),… but doesn’t work if I use two lines, eg:
df -h . pwd
These are all being made available via aliases (%rehashx, or direct via %alias). Any ideas on how to do this? I have a few leads, but figured I’d ask for expert advice first. My guess is that this might have to do with how the parser for line vs cell magic happens, but I’m unsure.
For more information, the use-case here is to allow the Jupyter commands to exactly mirror the standard Linux shell commands, so people learning how to run the software can transfer their skills seamlessly. This is why I’m trying to avoid adding things like the ‘%%bash’ magic, and other common ways of doing this sort of thing.
Thanks very much!