Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. from pymysql import connect
  2.  
  3. with connect(host='localhost', user='ham', password='ham', db='mysql', charset='utf8mb4') as conn:
  4. print(conn)
  5. # >> <pymysql.cursors.Cursor object at 0x>
  6.  
  7. conn = connect(host='localhost', user='ham', password='ham', db='mysql', charset='utf8mb4')
  8. print(conn)
  9. # >> <pymysql.connections.Connection object at 0x>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement