from twython import Twython
import time
import random
apiKey = 'IL2cl4l0utXc1aStFKvZNkS0F'
apiSecret = 'JtGkcWmyzQDWVpiVeM9mFUWSAYqjAux4z6p4qUVoSVuLuJlFps'
accessToken = '1206083934603431936-fZ9vf2mVrNaIW04DoPBKMcb3Vcd1Op'
accessTokenSecret = 'TSlorK1nYa9LYfA2UIgvObX4tv9m50kKv2o2H4abhWQPY'
while True:
seconds = time.time()
tweet = time.ctime (seconds)
with open("cputemp.txt") as f:
cputempfilecontent = f.readlines()[8]
tweet = tweet + cputempfilecontent
with open("cputemp.txt") as f:
cputempfilecontent = f.readlines()[9]
tweet = tweet + cputempfilecontent
with open("cputemp.txt") as f:
cputempfilecontent = f.readlines()[10]
tweet = tweet + cputempfilecontent
with open("cputemp.txt") as f:
cputempfilecontent = f.readlines()[11]
tweet = tweet + cputempfilecontent
api = Twython(apiKey,apiSecret,accessToken,accessTokenSecret)
api.update_status(status=tweet)
time.sleep(900)