Ali Afshar avatar Ali Afshar committed 02aab12

internal debugging shell

Comments (0)

Files changed (2)


 from ..view.base import Slave
+def create_pida_console(**locals_ns):
+    from pida.utils.pyconsole import Console
+    swin = gtk.ScrolledWindow()
+    swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS)
+    swin.add(Console(locals_ns,
+                     banner="Architect internal shell",
+                     use_rlcompleter=True,
+                    ))
+    swin.show_all()
+    return swin
 class DebugSlave(Slave):
+    def __init__(self, mainview):
+        self.set_main(mainview)
+        Slave.__init__(self)
     def create_ui(self):
         t = self.get_toplevel()
         self.dump_button = gtk.Button('Dump')
         buttons.pack_start(self.dump_button, expand=False)
+        console = create_pida_console(main=self.main)
+        t.pack_start(console)
     def set_main(self, mainview):
         self.main = mainview


         self.projecttree = projecttree
         from ..utils.debug import DebugSlave
-        self.debug = DebugSlave()
-        self.debug.set_main(self)
+        self.debug = DebugSlave(self)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.