Есть ли способ запустить встроенные команды BASH из Python?
Я пробовал:
subprocess.Popen(['bash','history'],shell=True, stdout=PIPE)
subprocess.Popen('history', shell=True, executable = "/bin/bash", stdout=subprocess.PIPE)
os.system('history')
и многие их варианты. Я хотел бы запустить history
или fc -ln
.