def textmyself(message) twiliocli client(accountsidauthtokenw twiliocli messages create(body=messagefrom_=twilionumberto=mynumberthis program stores an account sidauth tokensending numberand receiving number it then defined textmyself(to take on argument umake client object vand call create(with the message you passed if you want to make the textmyself(function available to your other programssimply place the textmyself py file in the same folder as your python script whenever you want one of your programs to text youjust add the followingimport textmyself textmyself textmyself('the boring task is finished 'you need to sign up for twilio and write the texting code only once after thatit' just two lines of code to send text from any of your other programs summary we communicate with each other on the internet and over cell phone networks in dozens of different waysbut email and texting predominate your programs can communicate through these channelswhich gives them powerful new notification features you can even write programs running on different computers that communicate with one another directly via emailwith one program sending emails with smtp and the other retrieving them with imap python' smtplib provides functions for using the smtp to send emails through your email provider' smtp server likewisethe third-party imapclient and pyzmail modules let you access imap servers and retrieve emails sent to you although imap is bit more involved than smtpit' also quite powerful and allows you to search for particular emailsdownload themand parse them to extract the subject and body as string values as security and spam precautionsome popular email services like gmail don' allow you to use the standard smtp and imap protocols to access their services the ezgmail module acts as convenient wrapper for the gmail apiletting your python scripts access your gmail account highly recommend that you set up separate gmail account for your scripts to use so that potential bugs in your program don' cause problems for your personal gmail account texting is bit different from emailsinceunlike emailmore than just an internet connection is needed to send sms texts fortunatelyservices such as twilio provide modules to allow you to send text messages from your programs once you go through an initial setup processyou'll be able to send texts with just couple lines of code with these modules in your skill setyou'll be able to program the specific conditions under which your programs should send notifications or