spawn a shell with python code example
Example 1: python spawn shell
python -c 'import pty;pty.spawn("/bin/bash")'
Example 2: execute command in python script
import os
os.system("ma Commande")
#Exemple:
os.system("cd Documents")
python -c 'import pty;pty.spawn("/bin/bash")'
import os
os.system("ma Commande")
#Exemple:
os.system("cd Documents")