According to the sample usage of the package you posted, you should be using the following syntax inside your def tweet(status):
authkey.statuses.update(status=status)
Note the use of the status=status
... to use a keyword argument, rather than a positional parameter
To clarify, your code becomes
def tweet(status):
if len(status) > 140 :
raise Exception ('Status message too long !!!')
authkey = t.Twitter(auth=t.OAuth(ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET, CONSUMER_KEY, CONSUMER_SECRET))
authkey.statuses.update(status=status) # <----- only this line changes
....
price = 99.99
status = "buy price is $" + str(price)
tweet(status)