Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. if __name__ == "__main__":
  2.     # Inicializar programa
  3.     command = ''
  4.    
  5.     # Mostrar menu
  6.     print_menu()
  7.    
  8.     # Loop principal
  9.     while command != 'sair':
  10.         #try:
  11.             command = raw_input('> ').strip()
  12.             if command.startswith("abrir"):
  13.                 carregar_PPM(command.split(" ")[1])
  14.             elif command.startswith("guardar"):
  15.                 guardar_PPM(command.split(" ")[1])
  16.             elif command.startswith("ver"):
  17.                 criar_imagem()  
  18.             else:
  19.                 if command.strip() != "sair": print 'Comando nao reconhecido!'
  20.         #except:
  21.             #print "erro
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement