3 ms·
No, `!command` only work on assignment. Please read http://ipython.readthedocs.io/en/stable/interactive/tutorial.html http://ipython.readthedocs.io/en/stable/i
by carreau 10y ago
No, `!command` only work on assignment.
Please read http://ipython.readthedocs.io/en/stable/interactive/tutorial.html http://ipython.readthedocs.io/en/stable/interactive/tutorial...
See tutos like https://www.youtube.com/watch?v=xe_ATRmw0KM https://www.youtube.com/watch?v=xe_ATRmw0KM , most of what works in the notebook work in IPython.
But yes you can do things like:
files = ! ls *.txt
for name in files:
with open(name) as f:
if 'Content-Type: text/x-rst' in f.read():
!git mv {name} {name[:-3]}rst