File: embed_function.py

package info (click to toggle)
ipython 9.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,620 kB
  • sloc: python: 45,416; sh: 317; makefile: 168
file content (16 lines) | stat: -rw-r--r-- 258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Embed IPython using the simple embed function rather than the class API."""

from IPython import embed

a = 10
b = 20

embed(header="First time", banner1="")

c = 30
d = 40

try:
    raise Exception("adsfasdf")
except:
    embed(header="The second time")