Is there a way to run the BASH built-in commands from Python?
I tried:
subprocess.Popen(['bash','history'],shell=True, stdout=PIPE)
subprocess.Popen('history', shell=True, executable = "/bin/bash", stdout=subprocess.PIPE)
os.system('history')
and many variations thereof. I would like to run history or fc -ln.
sudo). I think pexpect may fit that need.