Lines Matching refs:Python
10 // In order to guarantee correct working with Python, Python.h *MUST* be
14 // Python is disabled in this build
19 #include <Python/Python.h>
21 #include <Python.h>
352 embedded_interpreter_thread = Host::ThreadCreate ("<lldb.script-interpreter.noninteractive-python>",
591 // Python mucks with the terminal state of STDIN. If we can possibly avoid
601 // Python mucks with the terminal state of STDIN. If we can possibly avoid
616 // in some (rare) cases during cleanup Python may end up believing we have no thread state
720 // Go through the main dictionary looking for the correct python script interpreter dictionary
727 // them now so that Python's garbage collector doesn't collect them out from under us.
768 // method to pass the command string directly down to Python.
841 result->AppendErrorWithFormat ("python failed attempting to evaluate '%s'\n", command);
846 result->AppendError ("empty command passed to python\n");
879 out_stream->Printf ("Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.\n");
903 embedded_interpreter_thread = Host::ThreadCreate ("<lldb.script-interpreter.embedded-python-loop>",
1009 // directly from Python, in which case it is both dangerous and unnecessary (not to mention confusing) to
1010 // try to embed a running interpreter loop inside the already running Python interpreter loop, so we won't
1276 static const char *g_reader_instructions = "Enter your Python command(s). Type 'DONE' to end.";
1278 static const char *g_bkpt_command_reader_instructions = "Enter your Python command(s). Type 'DONE' to end.\n"
1584 // Set a Python one-liner as the callback for the breakpoint.
1593 // while the latter is used for Python to interpret during the actual callback.
1607 // Set a Python one-liner as the callback for the watchpoint.
1616 // while the latter is used for Python to interpret during the actual callback.
1672 // Verify that the results are valid Python.
1692 // Take what the user wrote, wrap it all up inside one big auto-generated Python function, passing in the
1742 // Wrap all user input into a Python class
1764 // Verify that the results are valid Python.
1916 // convert a variable's type into a python value format. Python value formats
2333 // Ensure we have the GIL before running any Python code.
2336 // If finer-grained locking is desirable, we can lock and unlock the GIL only when calling a python function.
2359 // user chooses to exit from the Python interpreter.
2360 // This embedded interpreter will, as any Python code that performs I/O, unlock the GIL before
2364 // PyGILState_Release (using the Locker above). This is because Python has a global lock which must be held whenever we want
2365 // to touch any Python objects. Otherwise, if the user calls Python code, the interpreter state will be off,
2634 error.SetErrorString("python script evaluation failed");
2666 error.SetErrorString("python script evaluation failed");
2698 error.SetErrorString("python script evaluation failed");
2730 error.SetErrorString("python script evaluation failed");
2798 // now make sure that Python has "directory" in the search path
2806 error.SetErrorString("Python sys.path handling failed");
2867 PyObject* py_error = PyErr_Occurred(); // per Python docs: "you do not need to Py_DECREF()" the return of this function
2871 if (py_error) // if we have a Python error..
2889 error.SetErrorStringWithFormat("Python error raised while importing module: %s - traceback: %s", PyString_AsString(PyObject_Str(value)),bt.c_str());
2891 error.SetErrorStringWithFormat("Python raised an error while importing module - traceback: %s",bt.c_str());
2986 // place outside of Python (e.g. printing to screen, waiting for the network, ...)
3008 // in Python, a special attribute __doc__ contains the docstring
3020 char* result_ptr = NULL; // Python is going to point this to valid data if ExecuteOneLineWithReturn returns successfully
3077 // Python will muck with STDIN terminal state, so save off any current TTY
3096 // Initialize SWIG after setting up python
3100 // Update the path python uses to search for modules to include the current directory.
3152 // // Py_Finalize here causes test suite runs to seg fault: The test suite runs in Python. It registers
3153 // // SBDebugger::Terminate to be called 'at_exit'. When the test suite Python harness finishes up, it calls