Advertisement
d1cor

comandos.py

Apr 10th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import os
  2.  
  3. command = " "
  4. while (command != "exit"):
  5.     command = input("Commando: ")
  6.     handle = os.popen(command)
  7.     line = " "
  8.     while line:
  9.         line = handle.read()
  10.         print(line)
  11.     handle.close()
  12.  
  13. print("bye!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement