cd /home/pi/mcpi
cd /home/pi/mcpi/api/Python/mcpi
python
import minecraft as minecraft
then python shows >>>
To connect with the new API:
mc = minecraft.Minecraft.create()
mc.postToChat("Hey, hey, hey, hey, hey")
mc.postToChat("Hey, beautiful day")
mc = minecraft.Minecraft.create()
mc.setBlock(0,0,0,46)
mc.setBlocks(0,0,0,10,10,10,3)
This creates a block at position 0,0,0, with dimensions 10x10x10 made out of "3" which in the Minecraft ID list is "dirt". You can modify the materials (0 is Air, 1 is Stone, 17 is wood, 8 is water, 20 is glass)