aboutsummaryrefslogtreecommitdiffstats
path: root/pdbrc.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-10-06 14:05:35 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-10-06 14:05:35 +0100
commit36698dbd11ab5d59ca1c377a3304b44e61f9b239 (patch)
treeabf3bda17bbdccc0afb135482f9d294be9edeaf2 /pdbrc.py
parent9fff448654308b1e1b3d1129c0255544f56c25cc (diff)
added stuff
Diffstat (limited to '')
-rw-r--r--pdbrc.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/pdbrc.py b/pdbrc.py
new file mode 100644
index 0000000..b3a8675
--- /dev/null
+++ b/pdbrc.py
@@ -0,0 +1,63 @@
+# import pdb
+#
+#
+# class Config(pdb.DefaultConfig):
+# sticky_by_default = True
+# current_line_color = 93
+# use_pygments = True
+# colorscheme =
+#
+#
+# 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
+
+
+import readline
+import pdb
+
+
+class Config(pdb.DefaultConfig):
+
+ editor = 'e'
+ stdin_paste = 'epaste'
+ filename_color = pdb.Color.lightgray
+ use_terminal256formatter = False
+ sticky_by_default = True
+ #exec_if_unfocused = "play ~/sounds/dialtone.wav 2> /dev/null &"
+
+ def __init__(self):
+ # readline.parse_and_bind('set convert-meta on')
+ # readline.parse_and_bind('Meta-/: complete')
+
+ try:
+ from pygments.formatters import terminal
+ except ImportError:
+ pass
+ else:
+ self.colorscheme = terminal.TERMINAL_COLORS.copy()
+ self.colorscheme.update({
+ terminal.Keyword: ('darkred', 'red'),
+ terminal.Number: ('darkyellow', 'yellow'),
+ terminal.String: ('brown', 'green'),
+ terminal.Name.Function: ('darkgreen', 'blue'),
+ terminal.Name.Namespace: ('teal', 'turquoise'),
+ })
+
+ def setup(self, pdb):
+ # make 'l' an alias to 'longlist'
+ Pdb = pdb.__class__
+ Pdb.do_l = Pdb.do_longlist
+ Pdb.do_st = Pdb.do_sticky