Skip to content

Commit dae34aa

Browse files
committed
Use bold and italic in {b,i}python
1 parent b0b2944 commit dae34aa

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ repos:
1919
hooks:
2020
- id: black
2121
language_version: python3
22+
exclude: 'trepan/version.py'
2223
stages: [pre-commit]

trepan/processor/command/bpython.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2015, 2020 Rocky Bernstein
2+
# Copyright (C) 2015, 2020, 2026 Rocky Bernstein
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -62,13 +62,15 @@ def run(self, args):
6262
pass
6363
pass
6464

65-
banner_tmpl = """trepan2 python shell%s
66-
Use dbgr(*string*) to issue debugger command: *string*"""
65+
banner_tmpl = """\033[1mIPython trepan3k shell%s\033[0m
66+
67+
Use dbgr(\x1b[3mstring\x1b[0m) to issue non-continuing debugger command.
68+
"""
6769

6870
debug = len(args) > 1 and args[1] == "-d"
6971
if debug:
7072
banner_tmpl += (
71-
"\nVariable 'debugger' contains a trepan" + "debugger object."
73+
"\nVariable \x1b[3mdebugger\x1b[0m) contains a trepan debugger object."
7274
)
7375
pass
7476
my_locals = {}
@@ -91,7 +93,7 @@ def run(self, args):
9193
banner = banner_tmpl % ""
9294
pass
9395

94-
sys.ps1 = "trepan2 >>> "
96+
sys.ps1 = "trepan3k >>> "
9597
print(banner)
9698
try:
9799
main_bpython([], my_locals)

trepan/processor/command/ipython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ def run(self, args):
6666
pass
6767

6868
cfg = Config()
69-
banner_tmpl = """IPython trepan3k shell%s
69+
banner_tmpl = """\033[1mIPython trepan3k shell%s\033[0m
7070
71-
Use dbgr(*string*) to issue non-continuing debugger command.
71+
Use Use dbgr(\x1b[3mstring\x1b[0m) to issue non-continuing debugger command.
7272
"""
7373

7474
debug = len(args) > 1 and args[1] == "-d"

0 commit comments

Comments
 (0)