NB:
.pdbrc
# NB: This file only works with single-line statements
import os
execfile(os.path.expanduser("~/.pdbrc.py"))
: https://wiki.python.org/moin/PdbRcIdea
PDB verwendet Readline- so können wir Readline- Geschichte speichern anweisen: Dies ist nur mit Python 2.
Credits getestet .pdbrc.py
def _pdbrc_init():
# Save history across sessions
import readline
histfile = ".pdb-pyhist"
try:
readline.read_history_file(histfile)
except IOError:
pass
import atexit
atexit.register(readline.write_history_file, histfile)
readline.set_history_length(500)
_pdbrc_init()
del _pdbrc_init
Welche Plattform benutzen Sie? – Keith
Ubuntu 11.04 Python 2.7.1+ (r271: 86832, 11. April 2011, 18:13:53) [GCC 4.5.2] unter linux2 – vkontori
Haben Sie dieses Problem gelöst? Ich hätte gerne eine ähnliche Funktion. – Phani