| 65 | |
| 66 | |
| 67 | def 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 | |
| 79 | def get_data_frame_info(variables, name, capsys): |