Getting shell commands up and ready to go

Starting up this project by putting 2 rudimentary functions
to get the command history and exit status of the last command.
I couldn't get the last command working properly, and I keep
getting code 127 (command not found) whenever I call get_error_code(),
but it's a start.
Rewriting as shell script

It turns out that I likely cannot accomplish what I want to do with
Python (see http://stackoverflow.com/questions/5460923/run-bash-built-in-commands-in-python#comment36803961_5485749 for reasons why)
Instead, I'm taking the opportunity to write my first BASH script.