From d5dc6369fca636f78c76f0f95aefb9817289e27f Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sun, 8 Jun 2008 19:54:48 +0200 Subject: [PATCH] extracting a launchDebugger code --- __init__.py | 1 + pygdb.py | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..013e4b7 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/python diff --git a/pygdb.py b/pygdb.py index e6c1dbc..64c48df 100755 --- 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) + + -- 2.30.2