The code is relatively simple, the program continually monitors the position of the player and by understanding where the player is and where they were, you can predict where they are going to be, if the block they are going to be standing on is empty (or AIR), fill it in!
This is based on the version 0.1.1 of Minecraft: Pi edition, see this post for info on how to install.
Download and run
You can download the code direct from git-hub, so run minecraft, open/create a world and follow the instructions:
If you want to have a go yourself, here's the code.
Create a directory for the program
Copy the python api class library from minecraft to the programs directory
Create minecraft-bridge.py python program
or open Idle and save minecraft-bridge.py to the minecraft-bridge directory
Be careful cutting and pasting direct from the web browser, its really easy to get odd characters in the code which will give you syntax errors.
The complete code repository is also on github, https://github.com/martinohanlon/minecraft-bridge.git
Note - minecraft must be running and you must be in a game
or if using Idle, click Run Module