Is there any way to switch to 'interactive' mode within a Python script, similar to the "keyboard" function in Matlab? I am aware of iPython, but I don't think it would allow me to 'pause' at some point in a script, e.g., within a for-loop, switch to interactive mode based on an if-statement.
In Matlab this would simply be something like:
for i = 1:100
% do stuff
if i == 55
keyboard
end
% do more stuff
end