#!/usr/bin/env python import tweepy import json import random from emoji import unicode_codes emoji = [e.encode('utf-8') for e in unicode_codes.EMOJI_UNICODE.values() if len(e.encode('utf-8')) == 4] with open(".twitter_config.json") as f: config = json.load(f) auth = tweepy.OAuthHandler(config["ckey"], config["csec"]) auth.set_access_token(config["utok"], config["usec"]) api = tweepy.API(auth) api.update_profile("Steven Smith " + random.choice(emoji))