Guest User

Untitled

a guest
Apr 7th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. D_text=Text(self.c, height=20, width=105)
  2. D_text.tag_configure('bold_italics',
  3. font=('Verdana', 12, 'bold', 'italic'))
  4.  
  5. D_text.tag_configure('big',
  6. font=('Verdana', 24, 'bold'))
  7. D_text.tag_configure('color',
  8. foreground='blue',
  9. font=('Tempus Sans ITC', 14))
  10. D_text.tag_configure('groove',
  11. relief=GROOVE,
  12. borderwidth=2)
  13. D_text.tag_bind('bite',
  14. '<1>',
  15. lambda e, t=D_text: t.insert(END, "Text"))
  16. D_text.pack(side=LEFT)
  17. D_text.place(x=370,y=250)
  18. D_text.insert(1.0,"hello")
  19. self.D_text_cont=D_text.get(1.0,END)
  20.  
  21.  
  22. connection=pymysql.connect
  23. (host='localhost',user="root",password="dcms5678",database="diaryon")
  24. cursor=connection.cursor()
  25. self.Saveit(self.D_text_cont,cursor)
  26. def Saveit(self,D_cont,c):
  27. print(D_cont)
  28. q2="insert into diary (content) VALUES ('%s') where diaryno=1888" %
  29. (D_cont)
  30. #q2="insert into diary (content) VALUES ('%s') where diaryno=('%s')" %
  31. (D_cont,D_user)
  32. c.execute(q2)
  33. c.commit()
Add Comment
Please, Sign In to add comment