MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / get_variable_value

Function get_variable_value

pythonFiles/tests/ipython/scripts.py:67–76  ·  view source on GitHub ↗
(variables, name, capsys)

Source from the content-addressed store, hash-verified

65
66
67def get_variable_value(variables, name, capsys):
68 varJson = find_variable_json(variables, name)
69 path = os.path.dirname(os.path.abspath(__file__))
70 file = os.path.abspath(os.path.join(path, "./getJupyterVariableValue.py"))
71 keys = dict([("_VSCode_JupyterTestValue", json.dumps(varJson))])
72 if execute_script(file, keys):
73 read_out = capsys.readouterr()
74 return json.loads(read_out.out)["value"]
75 else:
76 raise Exception("Getting variable value failed.")
77
78
79def get_data_frame_info(variables, name, capsys):

Callers 3

test_variable_valueFunction · 0.85
test_dataframe_infoFunction · 0.85
test_dataframe_rowsFunction · 0.85

Calls 4

find_variable_jsonFunction · 0.85
joinMethod · 0.80
execute_scriptFunction · 0.70
dirnameMethod · 0.65

Tested by 3

test_variable_valueFunction · 0.68
test_dataframe_infoFunction · 0.68
test_dataframe_rowsFunction · 0.68