示例#1
0
def run(infile):
    mymaillist = extract_mails(infile)
    info_from_mails(mymaillist)
    recordlist = master_string.split('\n')
    result = w2.writeFromList(recordlist)
    peopleList = result[0]
    compList = result[1]
    w2.makeCompPage(compList)
    return peopleList
示例#2
0
    print(finalmessage)
    master_string += finalmessage


def main(argv):
    return info_from_mails(argv)

if __name__ == "__main__":
    global master_string
    global save_str
    save_str = ''
    master_string = ''
    feed = list(sys.argv)
    os.chdir("C://Users/Adithya/Desktop/Summer '15/NEWCLEUS")
    if len(feed) < 2:
        feed = input('If you are looking up a single e-mail address, please type the e-mail address here. Otherwise, just hit enter.')
        if feed == '':
            feed = input('Enter e-mail addresses seperated by commas, or enter a list of e-mail addresses')
            if feed != '':
                info_from_mails(feed)
            else:
                mailsfile = input('Enter file name: ')
                mymaillist = extract_mails(mailsfile)
                info_from_mails(mymaillist)
                recordlist = master_string.split('\n')
                writetofile2.writeFromList(recordlist)                
        else:
            print(info_from_mail(feed))
    else:
        main(sys.argv[1])