This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ pdb hello_pdb.py | |
| *** Info : Psyco module replaced with pdb_psyco_stub | |
| > /home/sevas/code/python/hello_pdb.py(1)() | |
| -> import psyco | |
| (Pdb) c | |
| Traceback (most recent call last): | |
| ...snip... | |
| File "hello_pdb.py", line 7, in foo | |
| 1/0 | |
| ZeroDivisionError: integer division or modulo by zero |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #.pdbrc | |
| import sys | |
| import os | |
| sys.path += [os.getenv("HOME")] | |
| import pdb_psyco_stub | |
| sys.modules['psyco'] = pdb_psyco_stub | |
| print '*** Info : Psyco module replaced with pdb_psyco_stub' | |
| from pprint import pprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Psyco stub: should implement all the external API from psyco. | |
| Taken from the pydev eclipse extension. | |
| """ | |
| def proxy(func, *args, **kwargs): | |
| return func | |
| def bind(func, *args, **kwargs): | |
| return func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ pdb hello_pdb.py | |
| > /home/sevas/code/python/hello_pdb.py(1)() | |
| -> import psyco | |
| (Pdb) c | |
| Traceback (most recent call last): | |
| File "/usr/bin/pdb", line 1213, in main | |
| pdb._runscript(mainpyfile) | |
| File "/usr/bin/pdb", line 1138, in _runscript | |
| self.run(statement, globals=globals_, locals=locals_) | |
| File "/usr/lib/python2.5/bdb.py", line 366, in run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psyco | |
| psyco.full() | |
| def foo(arg): | |
| """triggers a breakpoint""" | |
| i, j, k = [arg]*3 | |
| 1/0 | |
| return arg*2 | |
| if __name__ == '__main__': |
NewerOlder