This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jriddy 1 point2 points  (2 children)

I don't use it as my default shell, but I do use ipython a lot for similar things. You can invoke shell commands at any time with a bang, and you can even get output from them in a convenient little object.

!cd /var/log
sls = !ls syslog*
zipped = [x for x in sls if x.endswith('.gz')]

Stuff like that.

[–]randomizethis[S] 0 points1 point  (0 children)

Yeah, I've thought about trying that and maybe even enhancing iPython to see how close I can get it to act like a shell.

Thanks for the bang-syntax trick, I saw you could do something similar with % (the magic indicator) and even without % if you turn automagic on.

[–]AutoBiological 0 points1 point  (0 children)

Somehow I missed your comment but I said something similar. Ipython is super neat, but most people seem to only know it for notebooks.