Pass Print messages in Python to email -


i've written python script has several print statements in it. i'd pass these print statements email script send me after has finished running. possible?

below attempt, errors out @ deleted =

import arcpy, os arcpy.deleterows_management(r"c:\gis_work\streetstesting\lake george.shp")  deleted = print "the rows have been deleted lake george"  # send email when script complete server = "my.mailserver.com" = "from@email.com>" = "to@email.com>" subject = "the script has completed" msg = deleted  # prepare actual message message = """\ from: %s to: %s subject: %s  %s """ % (from, ", ".join(to), subject, msg)  # send mail server = smtplib.smtp(server) server.sendmail(from, to, message) server.quit() 


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -