#!/usr/bin/env python


def uploadFile(filename):
    import ftplib
    s = ftplib.FTP('servername')
    s.login('server',password) # Connect
    f = open(filename,'rb')                # file to send
    s.storbinary('STOR %s'%filename, f)         # Send the file
    f.close()                                # Close file and FTP
    s.quit()

uploadFile('index.html')