import urllib.request, urllib.parse, urllib.error
import urllib.request, urllib.error, urllib.parse
name = 'name field'
data = {'name': name}
encoded_data = urllib.parse.urlencode(data)
content = urllib.request.urlopen('http://www.abc.com/messages.php?action=send',
    encoded_data)
print(content.readlines())
Using Python to sign into website, fill in a form, then sign out