Como escrever um programa que interage com o terminal

import os
os.system("cd") #cd is an example, you can write whatever there
Plain Piranha