Guest User

Untitled

a guest
Mar 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. def callbackInsereCritico(nome):
  2. conn = psycopg2.connect(host='localhost',
  3. database='diet+',
  4. user='postgres',
  5. password='teste')
  6.  
  7. cur = conn.cursor()
  8. curCritics = conn.cursor()
  9. cur.execute("INSERT INTO critico (nome) VALUES ('" + nome + "')")
  10. conn.commit()
  11.  
  12.  
  13.  
  14. rotuloAv = Label(formulario, text = "Cadastro do Avaliador")
  15. rotuloNm = Label(formulario, text = "Nome:")
  16. texto9 = Entry(formulario)
  17. botaoAv = Button(formulario, text = "Cadastrar",command = callbackInsereCritico(texto9.get()))
  18. resultadoAv = Label(formulario, text = None)
Add Comment
Please, Sign In to add comment