ID 268909 - Python Script execution hangs and does not produce output when iterating over large ranges

Follow

Problem summary
Python script execution hangs and does not produce output when iterating over large ranges

Customer reported version
nuke.10.5v2

Customer reported platform
centos6

Steps to reproduce

1) Open Nuke

2) Create a script editor tab (right click next to another tab > Windows > Script Editor)

3) Copy and Paste the following into the bottom half of the script editor window:

n=500000
for vertex in range(n): 
   print vertex



4) Select all the text in the script editor

5) Press [CTRL]+[ENTER] or [CMD+[ENTER]

Result:
Nuke starts being non responsive and will stay in this state until the iteration finishes

Workaround
Unknown. 

Reproduced by support
Win 7 - 10.5v2, 10.5v1, 10.0v5, 10.0v1, 9.0v8, 9.0v1, 8.0v1
MacOS 10.11 and 10.12 - 10.5v2. 10.0v5, 9.0v8, 9.0v1, 8.0v7
CentOS6 - 10.5v2, 9.0v8, 9.0v1

Expected behaviour
Nuke should be able to handle these iterations with no hang.

Actual behaviour
Nuke hangs and becomes non-responsive until the iteration finishes and no result is printed.

    We're sorry to hear that

    Please tell us why