From def5391ae5274e2df84176cde36bb1c44fbc95bd Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Mon, 22 Aug 2011 17:34:47 +0000 Subject: - Support for Python namespaces: If you have a Python module foo, in order to use its contained objects in LLDB you do not need to use 'from foo import *'. You can use 'import foo', and then refer to items in foo as 'foo.bar', and LLDB will know how to resolve bar as a member of foo. Accordingly, GNU libstdc++ formatters have been moved from the global namespace to gnu_libstdcpp and a few test cases are also updated to reflect the new convention. Python docs suggest using a plain 'import' en lieu of 'from-import'. llvm-svn: 138244 --- lldb/source/Interpreter/ScriptInterpreterPython.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 588e2c15651..45c68b1d59b 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -175,7 +175,7 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete PyRun_SimpleString (run_string.GetData()); run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'from gnu_libstdcpp import *')", m_dictionary_name.c_str(), + run_string.Printf ("run_one_line (%s, 'import gnu_libstdcpp')", m_dictionary_name.c_str(), interpreter.GetDebugger().GetID()); PyRun_SimpleString (run_string.GetData()); -- cgit v1.2.3