summaryrefslogtreecommitdiffstats
path: root/tests/test_shells/pdb-main.py
blob: 37af785f178e26a6486c1c4840b1f422754ddab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)

import pdb
import os
import sys

from powerline.bindings.pdb import use_powerline_prompt


@use_powerline_prompt
class Pdb(pdb.Pdb):
	pass


p = Pdb()


script = os.path.join(os.path.dirname(__file__), 'pdb-script.py')
with open(script, 'r') as fd:
	code = compile(fd.read(), script, 'exec')


p.run('exec(code)', globals={'code': code})