]>
git.sthu.org Git - pygdb.git/blob - pygdb.py
12 import MainControlWindow
23 while i
< len(sys
.argv
):
25 if sys
.argv
[i
] == "--help":
28 elif sys
.argv
[i
] == "--vim-servername":
30 args
["--vim-servername"] = sys
.argv
[i
]
33 args
["cmd"] = string
.join(sys
.argv
[i
:])
46 f
.write("""Call pygdb with a specific command to be debugged.
50 %s [--vim-servername NAME] <command>
52 where <command> is the command to call the client that should
59 The servername of the vim to communicate with
60 """ % (sys
.argv
[0], sys
.argv
[0]) )
65 if __name__
== "__main__":
75 if "--help" in args
.keys():
79 if not "cmd" in args
.keys():
80 sys
.stderr
.write("Please give executeable to debug.")
83 if "--vim-servername" in args
.keys():
84 vimservername
= args
["--vim-servername"]
86 vimservername
= "pygdb"
91 dbgterm
= GdbTerminal
.GdbTerminal(args
["cmd"])
94 mainCtrlWnd
= MainControlWindow
.MainControlWindow(dbgterm
)
95 statusWnd
= StatusWindow
.StatusWindow(dbgterm
, vimservername
)
99 conf
= Configuration
.Configuration()
100 conf
.load(".pygdb.conf")
101 statusWnd
.applyConfiguration(conf
)
106 conf
= Configuration
.Configuration()
107 statusWnd
.fillConfiguration(conf
)
109 conf
.store(".pygdb.conf")
111 statusWnd
.updateVim()