I'm used to typing !!
in bash when I want to reference the last command executed in that shell.
$ ls -la
drwxr-xr-x 4 me wheel 136 Jan 19 2013 wireshark_stuff
... (etc) ...
-rw-r--r-- 1 me wheel 11 Mar 13 13:51 old_PS1
$ !! |grep for_something_in_those_results
ls -la |grep for_something_in_those_results
/grep_results
Is there a way to do this in python?
>>> complicated_dict.['long_key_name'][0]
(response)
>>> my_func(!!)
This would get really handy as the interpreter commands become increasingly complicated. Sure, I could just use a plethora of local variables - but sometimes it's handy to just invoke the last thing run...