#!/usr/bin/env python
# twitterfunctions.py
# description: This file contains all the functions that are used when connecting to Twitter. Almost all of them rely on Tweepy
# copyrigtht: 2015 William Patton - PattonWebz
# licence: GPLv3

import tweepy

def authenticatetwitter(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_KEY, ACCESS_SECRET):
    # Authenticate with Twitter using keys and secrets and return
    # an 'api' object
   
    # Authorize with consumer credentials and get an access token 
    # with access credentials
    auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
    auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
   
    # get an authenticated instance of the API class
    api = tweepy.API(auth)
    
    # return API object 'api'
    return api
    

def sendtweet(api, tweet):
    # Send 'tweet' using Tweepy API function
    api.update_status(tweet)


@@ -416,19 +416,16 @@
  object%0A
-   
 %0A    # A
@@ -482,17 +482,16 @@
 ss token
- 
 %0A    # w
@@ -628,20 +628,17 @@
 SECRET)%0A
-   
 %0A
+
     # ge
@@ -709,21 +709,17 @@
 I(auth)%0A
-    
 %0A
+
     # re
@@ -759,13 +759,9 @@
 api%0A
-    
 %0A
+
 %0Adef
@@ -855,12 +855,18 @@
 tus(
+status=
 tweet)%0A
-%0A

Change the api.update_status() call to explicitly state the 'status' message.