View Category

Check your language appears on the site

Your language name should appear within the HTML found at the main page.
from urllib import urlopen
print urlopen('').read().find('python') >= 0 and 'found' or 'not found'

Send an email

Use library functions, classes or objects to create a short email addressed to your own email address. The subject should be, "Greetings from", and the user should be prompted for the message body, and whether to cancel or proceed with sending the email.
import smtplib
import locale

from email.mime.text import MIMEText

encoding = locale.getpreferredencoding()

def main():
smtp_servername = ""

from_addr = ""
to_addr = ""

body = raw_input("Enter the email message ")
if not raw_input("Send email? y/N ") in ["y", "Y"]:
print "aborting"

message = MIMEText(body, _charset=encoding)

message["From"] = from_addr
message["To"] = to_addr
message["Subject"] = "Greetings from"

server = smtplib.SMTP(smtp_servername)
server.sendmail(from_addr, to_addr, message.as_string())

if __name__ == "__main__":