Runpy function, runs a region of python code