While I have no answer to your specific question, I would suggest using an Ipython Notebook for these things (and much more!)
Make sure you have %pylab inlineone in the cell.
When you create a story, it will display it in the notebook itself. Then inside your camera, just keep experimenting until you get it right (use Ctrl-Enterin the cell). Now the cell will have all the statements you need (and no more!)
The difference between the command line interpreter and the notebook is that all the previous instructions you entered led to a lot of interference. Using a laptop, you can edit the line in place.
source
share