extracting a launchDebugger code
authorStefan Huber <shuber2@gmail.com>
Sun, 8 Jun 2008 17:54:48 +0000 (19:54 +0200)
committerStefan Huber <shuber2@gmail.com>
Sun, 8 Jun 2008 17:54:48 +0000 (19:54 +0200)
__init__.py [new file with mode: 0644]
pygdb.py

diff --git a/__init__.py b/__init__.py
new file mode 100644 (file)
index 0000000..013e4b7
--- /dev/null
@@ -0,0 +1 @@
+#!/usr/bin/python
index e6c1dbccb64a0d29ada143869b91c4917fcce1aa..64c48df01fc383ffef040277475070f40b1c3949 100755 (executable)
--- a/pygdb.py
+++ b/pygdb.py
@@ -12,15 +12,8 @@ import MainControlWindow
 import StatusWindow
 
 
-if __name__ == "__main__":
-
-       #Check if enough arguments are given
-       if len(sys.argv) <= 1:
-               print "Please give executeable to debug."
-               sys.exit(-1)
-
-       #Create the terminals
-       clientCmd = string.join(sys.argv[1:])
+def launchDebugger(clientCmd):
+       #Create Terminal
        dbgterm = GdbTerminal.GdbTerminal(clientCmd)
 
        #Create windows
@@ -34,3 +27,15 @@ if __name__ == "__main__":
 
 
 
+if __name__ == "__main__":
+
+       #Check if enough arguments are given
+       if len(sys.argv) <= 1:
+               print "Please give executeable to debug."
+               sys.exit(-1)
+
+       #Create the terminals
+       clientCmd = string.join(sys.argv[1:])
+       launchDebugger(clientCmd)
+
+