From: kammerla <kam...@gm...> - 2006-12-29 16:37:28
|
Okay, here is what i found: "(e:\\sources\\capfilterscanner\\capanalyzer.py:3): <module> (Pydb) " in the emacs gud-buffer appears "Current directory is e:/Sources/CapFilterScanner/ <module> (Pydb) step <module> (Pydb) " Synchronization with the source buffer is perfect and your suggestion "^(\\(?:[a-zA-Z]:\\)?\\([-a-zA-Z0-9_/\\\\.]*\\):\\([0-9]+\\)):[ \t]?" also works fine. (though i do not understand the '?' and the ':' in front of the first opening squared bracket...) I would have expected that the module name and the current line number appear in the gud-buffer, but the (defun gud-pydb-marker-filter (string) ...) seems to filter it out and i can't figure out how it should be. Anyway pydb within emacs is what i was looking for to help me learning python. R. Bernstein schrieb: > My guess is that a drive letter and backslashes are shown in the > location pydb is printing and this is what is not getting > recognized. That is, pydb prints something like: > > (c:\mydirectory\myprog.py:10): > > If you could copy what appears as a location, e.g. the part that I > think will sort of look like what's above -- the line that has the > parenthesis -- that would help out. > > I had been running under cygwin which doesn't show drive letters or > use backslashes. > > A couple comments though about the regular expression used. The > pattern you give will match an all sorts of non-drive things, for example: > > (::a:bbbb:c:\mydirectory\myprog.py:10): > > So try using this instead: > > "^(\\(?:[a-zA-Z]:\\)?\\([-a-zA-Z0-9_/\\\\.]*\\):\\([0-9]+\\)):[ \t]?" > > > There may be another thing in the regular expression you suggests that > may be cause problems. I guess that so far the drive printed also > happens to be your "current" drive. If you have another drive around > try putting a script on that while your current drive is not that. > > If that doesn't work and the above change did not break things too, > then try: > > "^(\\(\\(?:[a-zA-Z]:\\)?[-a-zA-Z0-9_/\\\\.]*\\):\\([0-9]+\\)):[ \t]?" > > and see if this works. > > If you get back with the results, I'll look into updating that nasty > regular expression. And yes, regular expressions in GNU Emacs Lisp > are a pain in the ass to get right. > > > ralph.kammerlander writes: > > Hi, > > I'm an absolute beginner with python (and emacs ...) and trying to learn something new. > > I am using python 2.5 under WinXP (okay, I could use an other os ...) > > I just wanted to use pydb with emacs, but i could only get it to work with the source buffer, when i changed > > > > (defconst gud-pydb-marker-regexp > > "^(\\([-a-zA-Z0-9_/.]*\\):\\([0-9]+\\)):[ \t]?" > > to > > (defconst gud-pydb-marker-regexp > > "^([a-zA-Z:]*\\([-a-zA-Z0-9_/\\\\.]*\\):\\([0-9]+\\)):[ \t]?" > > > > I assume that's not the right way to do it ... > > Could somebody help me? > > > > Ralph > > |