In this instructable we'll modify my simpleTweet_00 and rewrite the Processing code with Python. You can expect an ignorant walkthrough by an illiterate noob, but maybe that's just what you're looking for.
Before you begin:
If you need help installing Python, navigating Windows from the Command Prompt, or installing packages, then take a look at my instructable How to install Python packages on Windows 7 . It's a quick and dirty walkthrough but it should get you going asap.
And because simpleTweet_00 already explains the concept, I'll be brief: Arduino sends a message via Serial to Python; Python sends a tweet. The idea here is to create a simple Arduino Python Twitter communication. For beginners.
Let's do it.
Step 1: Concept
We attach the magnetic reed sensor to my office door and door-frame. A wire runs from the magReed sensor to a pin in the Arduino circuit. Arduino watches that pin's status, HIGH or LOW, and when the status changes from one to the other Arduino reports on that change through Serial(). The Python sketch picks up the Serial() call and checks to see if the current state is the same as the last one posted to Twitter. If the two states are the same then it will not post, but if the new state is different from the previous state, then we're in business.
Python uses python-twitter and OAuth to post the new state to your Twitter account. Done and done.