isolate python code