Python console: added wait for previous execution ending (PY-3573).