TweetResistance

Install python-twitter

  1. Uninstall any old versions of python-twitter by deleting C:\Python27\Lib\site-packages\python-twitter*.egg
  2. Check that python-twitter is not yet installed
    1. Open Spyder
    2. Run
      import twitter
    3. Check that you get an error
      ImportError: No module named twitter
  3. Download
    1. Go to https://github.com/bear/python-twitter
    2. Click the ‘Download ZIP’ button
    3. Uncompress in a suitable location
  4. Install
    1. Open a Command Prompt (Windows key, ‘cmd’, enter)
    2. Navigate into the uncompressed ZIP archive
    3. Run
      python setup.py install
  5. Check that the installation worked
    1. Open Spyder
    2. Run
      import twitter
      help(twitter)
    3. The output should start with
      Help on package twitter:
      
      NAME
          twitter - A library that provides a Python interface to the Twitter API

Create a Twitter account

  1. Go to https://twitter.com/ and create an account if you do not have one yet
  2. Go to https://dev.twitter.com/
  3. At the bottom of the page, click Tools/Manage Your Apps
  4. Click ‘Create New App’
  5. Enter the name of your game
  6. Enter the Website: http://eseo-emc.fr/teaching/tweetresistance/
  7. Fill out the rest of the form
  8. Click ‘Create your Twitter application’ down the form
  9. On the page that then appears, click the ‘Keys and Access Tokens’ tab, and then ‘Create my access token’ at the bottom of the page
  10. Keep this page open, you will need it
  11. Install a Twitter client on your smart phone if you don’t have one yet
  12. Send a first tweet, with or without photo

Get started with the game

  1. Download
    1. Go to https://github.com/eseo-emc/tweetresistance
    2. Click the ‘Download ZIP’ button
    3. Uncompress in a suitable location
  2. Open Spyder
  3. Open twitpic.py from the unpacked tweetresistance archive and enter the API key/secret and the access key/secret and your screen name (5 parameters in all) from the open webpage
  4. Hit F6 and
    1. choose ‘Exécuter dans un nouvel interpréteur Python dédié’ (you will need to do this for all files that you want to execute.
    2. tick the ‘Interagir avec l’interpréteur Python après l’exécution’ checkbox
    3. click ‘OK’
  5. Hit F5 and check that you see your latest tweet
  6. Open tweetresistance.py and hit F5 (do not worry about the AttributeError in red, that’s my bad)

Electromagnetic Compatibility