I was wondering if there is a way to automatically run commands on entering the python shell as you would with the .bash_profile or .profile scripts with bash. I would like
Yup you can use the PYTHONSTARTUP environment variable to do this as outlined here
PYTHONSTARTUP