Skip to content

Instantly share code, notes, and snippets.

@Neyt
Created August 13, 2016 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neyt/1f1a949759b1d5ad4564734b05f7bbdf to your computer and use it in GitHub Desktop.
Save Neyt/1f1a949759b1d5ad4564734b05f7bbdf to your computer and use it in GitHub Desktop.
Send text messages to cell phones with python
#this program imports a library called twilio that allows you to send text messages just like celphones through a python program. not available in everycountry thouhg
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from twilio.rest import TwilioRestClient
account_sid = "{{ account_sid }}" # Your Account SID from www.twilio.com/console
auth_token = "{{ auth_token }}" # Your Auth Token from www.twilio.com/console
client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(body="Hello from Python",
to="+12345678901", # Replace with your phone number
from_="+12345678901") # Replace with your Twilio number
print(message.sid)
#ls, unzip, tab, cat (list), used for reading.
#shell outcompletes with tab
#tab also give you a list of files with the lettes you started with
#wc is a word count program
#diff compares files and shows you how they differ.
#ex diff a.txt b.txt
#man
#history. or command + R
#ping tells you if a computer is alive
# control+c stops this programs
#line based programs, stdin writes a program and gives you stdout.
#control+d
#sort (creates a list but it executes when "control+d")
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment