Skip to content

Commit 77e1705

Browse files
committed
increased python execution step limit from 300 to 1000
1 parent 5192811 commit 77e1705

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎v3/pg_logger.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252

5353
# upper-bound on the number of executed lines, in order to guard against
5454
# infinite loops
55-
MAX_EXECUTED_LINES = 300
55+
#MAX_EXECUTED_LINES = 300
56+
MAX_EXECUTED_LINES = 1000 # on 2016-05-01, I increased the limit from 300 to 1000 for Python due to popular user demand! and I also improved the warning message
5657

5758
#DEBUG = False
5859
DEBUG = True
@@ -1157,7 +1158,7 @@ def create_encoded_stack_entry(cur_frame):
11571158

11581159

11591160
if len(self.trace) >= MAX_EXECUTED_LINES:
1160-
self.trace.append(dict(event='instruction_limit_reached', exception_msg='(stopped after ' + str(MAX_EXECUTED_LINES) + ' steps to prevent possible infinite loop)'))
1161+
self.trace.append(dict(event='instruction_limit_reached', exception_msg='Stopped after ' + str(MAX_EXECUTED_LINES) + ' steps. Please shorten your code, since Python Tutor is not designed to handle long-running code.'))
11611162
self.force_terminate()
11621163

11631164
self.forget()

0 commit comments

Comments
 (0)