Maked LLDB into a package so we can import things without poluting the global namespace.

Enrico will follow this up with fixing the data formatter test cases that are failing.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreterPython.cpp b/source/Interpreter/ScriptInterpreterPython.cpp
index 39c1117..3c1139f 100644
--- a/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/source/Interpreter/ScriptInterpreterPython.cpp
@@ -296,13 +296,14 @@
     
     int old_count = Debugger::TestDebuggerRefCount();
     
-    run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb, gnu_libstdcpp, libcxx, objc, Logger')", m_dictionary_name.c_str());
+    run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb')", m_dictionary_name.c_str());
     PyRun_SimpleString (run_string.GetData());
 
     // WARNING: temporary code that loads Cocoa formatters - this should be done on a per-platform basis rather than loading the whole set
     // and letting the individual formatter classes exploit APIs to check whether they can/cannot do their task
     run_string.Clear();
-    run_string.Printf ("run_one_line (%s, 'import CFString, CFArray, CFDictionary, NSData, NSMachPort, NSSet, NSNotification, NSException, CFBag, CFBinaryHeap, NSURL, NSBundle, NSNumber, NSDate, NSIndexSet, Selector, Class, CFBitVector')", m_dictionary_name.c_str());
+    //run_string.Printf ("run_one_line (%s, 'from lldb.formatters import *; from lldb.formatters.objc import *; from lldb.formatters.cpp import *')", m_dictionary_name.c_str());
+    run_string.Printf ("run_one_line (%s, 'from lldb.formatters import *')", m_dictionary_name.c_str());
     PyRun_SimpleString (run_string.GetData());
 
     int new_count = Debugger::TestDebuggerRefCount();
@@ -1961,13 +1962,7 @@
         }
     }
 
-    PyRun_SimpleString ("sys.dont_write_bytecode = 1");
-
-    PyRun_SimpleString ("import embedded_interpreter");
-    
-    PyRun_SimpleString ("from embedded_interpreter import run_python_interpreter");
-    PyRun_SimpleString ("from embedded_interpreter import run_one_line");
-    PyRun_SimpleString ("from termios import *");
+    PyRun_SimpleString ("sys.dont_write_bytecode = 1; import lldb.embedded_interpreter; from lldb.embedded_interpreter import run_python_interpreter; from lldb.embedded_interpreter import run_one_line; from termios import *");
 
     stdin_tty_state.Restore();
 }