added fondation for interactive mode in python

Added basic instrumentation of the python interactive mode.