python 3 bug in interactive script