版权声明:皆为本人原创,复制必究 https://blog.csdn.net/m493096871/article/details/86490212
模拟shell命令
import os
shellTerminal = "[root@python ]$"
while True:
print(shellTerminal, end="")
commandFor = str(input())
if commandFor:
os.system(commandFor)
print("")
if commandFor == "exit":
break
else:
continue