From 9addd9b24e4d6cf35b151922f9abd9b4abba3d03 Mon Sep 17 00:00:00 2001 From: Justin Wozniak Date: Fri, 2 Nov 2018 10:46:44 -0500 Subject: [PATCH] Clean up Python debugging output (ref #153) --- turbine/code/src/tcl/python/tcl-python.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/turbine/code/src/tcl/python/tcl-python.c b/turbine/code/src/tcl/python/tcl-python.c index 7c963eba2..a3cd6765b 100644 --- a/turbine/code/src/tcl/python/tcl-python.c +++ b/turbine/code/src/tcl/python/tcl-python.c @@ -109,7 +109,6 @@ python_init(void) if (initialized) return TCL_OK; DEBUG_TCL_TURBINE("python: initializing..."); - printf("python: initializing...\n"); Py_InitializeEx(1); main_module = PyImport_AddModule("__main__"); if (main_module == NULL) return handle_python_exception(true); @@ -154,13 +153,11 @@ python_eval(bool persist, bool exceptions_are_errors, // Execute code: DEBUG_TCL_TURBINE("python: code: %s", code); - printf("python: code: %s\n", code); fflush(stdout); PyRun_String(code, Py_file_input, main_dict, local_dict); if (PyErr_Occurred()) EXCEPTION(exceptions_are_errors); // Evaluate expression: DEBUG_TCL_TURBINE("python: expr: %s", expr); - printf("python: expr: %s\n", expr); fflush(stdout); PyObject* o = PyRun_String(expr, Py_eval_input, main_dict, local_dict); if (o == NULL) EXCEPTION(exceptions_are_errors); @@ -168,8 +165,7 @@ python_eval(bool persist, bool exceptions_are_errors, // Convert Python result to C string rc = PyArg_Parse(o, "s", &s); if (rc != 1) return handle_python_non_string(o); - // DEBUG_TCL_TURBINE - printf("python: result: %s\n", s); + DEBUG_TCL_TURBINE("python: result: %s\n", s); *result = strdup(s); // Clean up and return: @@ -204,7 +200,6 @@ Python_Eval_Cmd(ClientData cdata, Tcl_Interp *interp, rc = python_eval(persist, exceptions_are_errors, code, expr, &output); TCL_CHECK(rc); - printf("python: output: %s\n", output); Tcl_Obj* result = Tcl_NewStringObj(output, -1); Tcl_SetObjResult(interp, result); free(output);