Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 14fc52a

Browse files
committed
Clean: No need to import the deleted files for creating traces
1 parent 06012b3 commit 14fc52a

File tree

7 files changed

+16
-504
lines changed

7 files changed

+16
-504
lines changed

runestone/codelens/callback_module.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

runestone/codelens/htmlFrame.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

runestone/codelens/html_module.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

runestone/codelens/htmlexample_module.py

Lines changed: 0 additions & 71 deletions
This file was deleted.

runestone/codelens/matrix.py

Lines changed: 0 additions & 179 deletions
This file was deleted.

runestone/codelens/pg_logger.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
# of all in-scope data structures after each executed instruction.
3030

3131

32+
import json
33+
import random
34+
from .pg_encoder import is_class, is_instance, ObjectEncoder, create_lambda_line_number
3235
import sys
3336
import bdb # the KEY import here!
3437
import re
@@ -45,7 +48,6 @@
4548
else:
4649
import StringIO
4750

48-
from .pg_encoder import is_class, is_instance, ObjectEncoder, create_lambda_line_number
4951

5052
# TODO: not threadsafe:
5153

@@ -149,16 +151,16 @@ def setJS(jsStr):
149151
# especially getting setHTML, setCSS, and setJS to work in the imported
150152
# modules.)
151153
CUSTOM_MODULE_IMPORTS = (
152-
"runestone.codelens.callback_module",
153-
"runestone.codelens.ttt_module",
154-
"runestone.codelens.html_module",
155-
"runestone.codelens.htmlexample_module",
156-
# ignore these troublesome imports for now
157-
# 'watch_module', # 'import sys' might be troublesome
158-
# 'bintree_module',
159-
# 'GChartWrapper',
160-
"runestone.codelens.matrix",
161-
"runestone.codelens.htmlFrame",
154+
# "runestone.codelens.callback_module",
155+
# "runestone.codelens.ttt_module",
156+
# "runestone.codelens.html_module",
157+
# "runestone.codelens.htmlexample_module",
158+
# # ignore these troublesome imports for now
159+
# # 'watch_module', # 'import sys' might be troublesome
160+
# # 'bintree_module',
161+
# # 'GChartWrapper',
162+
# "runestone.codelens.matrix",
163+
# "runestone.codelens.htmlFrame",
162164
)
163165

164166

@@ -218,7 +220,6 @@ def __restricted_import__(*args):
218220
# Note that this is mad inefficient, but is simple to implement!
219221

220222
# VERY IMPORTANT -- set random seed to 0 to ensure deterministic execution:
221-
import random
222223

223224
random.seed(0)
224225

@@ -398,6 +399,8 @@ def get_user_stdout(frame):
398399
"""
399400

400401
# at_global_scope should be true only if 'frame' represents the global scope
402+
403+
401404
def get_user_globals(frame, at_global_scope=False):
402405
d = filter_var_dict(frame.f_globals)
403406

@@ -1506,9 +1509,8 @@ def finalize(self):
15061509
return self.finalizer_func(self.executed_script, self.trace)
15071510

15081511

1509-
import json
1510-
15111512
# the MAIN meaty function!!!
1513+
15121514
def exec_script_str(script_str, raw_input_lst_json, options_json, finalizer_func):
15131515
options = json.loads(options_json)
15141516

0 commit comments

Comments
 (0)