Import overrides from environment in PDB prompts

This commit is contained in:
ZyX 2015-01-31 20:23:10 +03:00
parent 5bc68b66fe
commit 2ef5107628
5 changed files with 207 additions and 176 deletions

View File

@ -239,3 +239,9 @@ In order to keep shell prompt, but avoid launching Python twice to get unused
In order to remove additional space from the end of the right prompt in fish In order to remove additional space from the end of the right prompt in fish
that was added in order to support multiline prompt ``$POWERLINE_NO_FISH_ABOVE`` that was added in order to support multiline prompt ``$POWERLINE_NO_FISH_ABOVE``
or ``$POWERLINE_NO_SHELL_ABOVE`` variable should be set. or ``$POWERLINE_NO_SHELL_ABOVE`` variable should be set.
PDB overrides
=============
Like shell bindings :ref:`PDB bindings <pdb-prompt>` take overrides from
:ref:`environment variables <local-configuration-overrides-env>`.

View File

@ -125,6 +125,8 @@ the used profile:
IPython=0.11* is not supported and does not work. IPython<0.10 was not IPython=0.11* is not supported and does not work. IPython<0.10 was not
tested (not installable by pip). tested (not installable by pip).
.. _pdb-prompt:
PDB prompt PDB prompt
========== ==========

View File

@ -3,8 +3,11 @@ from __future__ import (unicode_literals, division, absolute_import, print_funct
import sys import sys
import platform import platform
import os
from powerline import Powerline from powerline import Powerline
from powerline.lib.overrides import parse_override_var
from powerline.lib.dict import mergeargs, mergedicts
class PDBPowerline(Powerline): class PDBPowerline(Powerline):
@ -21,5 +24,25 @@ class PDBPowerline(Powerline):
self.update_renderer() self.update_renderer()
self.renderer.set_pdb(pdb) self.renderer.set_pdb(pdb)
def load_main_config(self):
r = super(PDBPowerline, self).load_main_config()
config_overrides = os.environ.get('POWERLINE_CONFIG_OVERRIDES')
if config_overrides:
mergedicts(r, mergeargs(parse_override_var(config_overrides)))
return r
def load_theme_config(self, name):
r = super(PDBPowerline, self).load_theme_config(name)
theme_overrides = os.environ.get('POWERLINE_THEME_OVERRIDES')
if theme_overrides:
theme_overrides_dict = mergeargs(parse_override_var(theme_overrides))
if name in theme_overrides_dict:
mergedicts(r, theme_overrides_dict[name])
return r
def get_config_paths(self):
paths = [path for path in os.environ.get('POWERLINE_CONFIG_PATHS', '').split(':') if path]
return paths or super(PDBPowerline, self).get_config_paths()
if sys.version_info < (3,) and platform.python_implementation() == 'PyPy': if sys.version_info < (3,) and platform.python_implementation() == 'PyPy':
get_encoding = staticmethod(lambda: 'ascii') get_encoding = staticmethod(lambda: 'ascii')

View File

@ -1,224 +1,224 @@
 1  pdb-script.py:2 <module>  s  1  pdb-script.py:2 <module>  s
-> class Foo(object): -> class Foo(object):
 1  pdb-script.py:6 <module>    1  pdb-script.py:6 <module>  
--Call-- --Call--
-> class Foo(object): -> class Foo(object):
 2  pdb-script.py:6 <module>  pdb-script.py:6 Foo    2  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> class Foo(object): -> class Foo(object):
 2  pdb-script.py:6 <module>  pdb-script.py:6 Foo    2  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> def __init__(self): -> def __init__(self):
 2  pdb-script.py:6 <module>  pdb-script.py:7 Foo    2  pdb-script.py:6 <module>  pdb-script.py:7 Foo  
-> @classmethod -> @classmethod
 2  pdb-script.py:6 <module>  pdb-script.py:13 Foo    2  pdb-script.py:6 <module>  pdb-script.py:13 Foo  
-> @staticmethod -> @staticmethod
 2  pdb-script.py:6 <module>  pdb-script.py:17 Foo    2  pdb-script.py:6 <module>  pdb-script.py:17 Foo  
-> def bra(self): -> def bra(self):
 2  pdb-script.py:6 <module>  pdb-script.py:21 Foo    2  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
--Return-- --Return--
-> def bra(self): -> def bra(self):
 2  pdb-script.py:6 <module>  pdb-script.py:21 Foo    2  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
-> def brah(): -> def brah():
 1  pdb-script.py:25 <module>    1  pdb-script.py:25 <module>  
-> f = Foo() -> f = Foo()
 1  pdb-script.py:29 <module>    1  pdb-script.py:29 <module>  
--Call-- --Call--
-> def __init__(self): -> def __init__(self):
 2  pdb-script.py:29 <module>  pdb-script.py:7 __init__    2  pdb-script.py:29 <module>  pdb-script.py:7 __init__  
-> nop('__init__') -> nop('__init__')
 2  pdb-script.py:29 <module>  pdb-script.py:8 __init__    2  pdb-script.py:29 <module>  pdb-script.py:8 __init__  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:2 nop    3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop    3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop    3  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
-> self.bar() -> self.bar()
 2  pdb-script.py:29 <module>  pdb-script.py:9 __init__    2  pdb-script.py:29 <module>  pdb-script.py:9 __init__  
--Call-- --Call--
-> @classmethod -> @classmethod
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:13 bar    3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar    3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:2 nop    4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar    3  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
-> self.baz() -> self.baz()
 2  pdb-script.py:29 <module>  pdb-script.py:10 __init__    2  pdb-script.py:29 <module>  pdb-script.py:10 __init__  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:17 baz    3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz    3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:2 nop    4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz    3  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
-> self.bra() -> self.bra()
 2  pdb-script.py:29 <module>  pdb-script.py:11 __init__    2  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:21 bra    3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra    3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:2 nop    4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra    3  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Return-- --Return--
-> self.bra() -> self.bra()
 2  pdb-script.py:29 <module>  pdb-script.py:11 __init__    2  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
-> Foo.bar() -> Foo.bar()
 1  pdb-script.py:30 <module>    1  pdb-script.py:30 <module>  
--Call-- --Call--
-> @classmethod -> @classmethod
 2  pdb-script.py:30 <module>  pdb-script.py:13 bar    2  pdb-script.py:30 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 2  pdb-script.py:30 <module>  pdb-script.py:15 bar    2  pdb-script.py:30 <module>  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop    3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    3  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 2  pdb-script.py:30 <module>  pdb-script.py:15 bar    2  pdb-script.py:30 <module>  pdb-script.py:15 bar  
-> Foo.baz() -> Foo.baz()
 1  pdb-script.py:31 <module>    1  pdb-script.py:31 <module>  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 2  pdb-script.py:31 <module>  pdb-script.py:17 baz    2  pdb-script.py:31 <module>  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 2  pdb-script.py:31 <module>  pdb-script.py:19 baz    2  pdb-script.py:31 <module>  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop    3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    3  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 2  pdb-script.py:31 <module>  pdb-script.py:19 baz    2  pdb-script.py:31 <module>  pdb-script.py:19 baz  
-> Foo.bra(f) -> Foo.bra(f)
 1  pdb-script.py:32 <module>    1  pdb-script.py:32 <module>  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 2  pdb-script.py:32 <module>  pdb-script.py:21 bra    2  pdb-script.py:32 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 2  pdb-script.py:32 <module>  pdb-script.py:22 bra    2  pdb-script.py:32 <module>  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop    3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    3  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 2  pdb-script.py:32 <module>  pdb-script.py:22 bra    2  pdb-script.py:32 <module>  pdb-script.py:22 bra  
-> f.bar() -> f.bar()
 1  pdb-script.py:34 <module>    1  pdb-script.py:34 <module>  
--Call-- --Call--
-> @classmethod -> @classmethod
 2  pdb-script.py:34 <module>  pdb-script.py:13 bar    2  pdb-script.py:34 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 2  pdb-script.py:34 <module>  pdb-script.py:15 bar    2  pdb-script.py:34 <module>  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop    3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    3  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 2  pdb-script.py:34 <module>  pdb-script.py:15 bar    2  pdb-script.py:34 <module>  pdb-script.py:15 bar  
-> f.baz() -> f.baz()
 1  pdb-script.py:35 <module>    1  pdb-script.py:35 <module>  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 2  pdb-script.py:35 <module>  pdb-script.py:17 baz    2  pdb-script.py:35 <module>  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 2  pdb-script.py:35 <module>  pdb-script.py:19 baz    2  pdb-script.py:35 <module>  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop    3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    3  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 2  pdb-script.py:35 <module>  pdb-script.py:19 baz    2  pdb-script.py:35 <module>  pdb-script.py:19 baz  
-> f.bra() -> f.bra()
 1  pdb-script.py:36 <module>    1  pdb-script.py:36 <module>  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 2  pdb-script.py:36 <module>  pdb-script.py:21 bra    2  pdb-script.py:36 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 2  pdb-script.py:36 <module>  pdb-script.py:22 bra    2  pdb-script.py:36 <module>  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop    3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    3  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 2  pdb-script.py:36 <module>  pdb-script.py:22 bra    2  pdb-script.py:36 <module>  pdb-script.py:22 bra  
-> brah() -> brah()
 1  pdb-script.py:38 <module>    1  pdb-script.py:38 <module>  
--Call-- --Call--
-> def brah(): -> def brah():
 2  pdb-script.py:38 <module>  pdb-script.py:25 brah    2  pdb-script.py:38 <module>  pdb-script.py:25 brah  
-> nop('brah') -> nop('brah')
 2  pdb-script.py:38 <module>  pdb-script.py:26 brah    2  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:2 nop    3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:2 nop  
-> pass -> pass
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop    3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop    3  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return-- --Return--
-> nop('brah') -> nop('brah')
 2  pdb-script.py:38 <module>  pdb-script.py:26 brah    2  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Return-- --Return--
-> brah() -> brah()
 1  pdb-script.py:38 <module>    1  pdb-script.py:38 <module>  
--Return-- --Return--
 0    0  

View File

@ -1,223 +1,223 @@
--Call-- --Call--
-> def nop(_): -> def nop(_):
 2  <string>:1 <module>  pdb-script.py:2 <module>    2  <string>:1 <module>  pdb-script.py:2 <module>  
-> def nop(_): -> def nop(_):
 2  <string>:1 <module>  pdb-script.py:2 <module>    2  <string>:1 <module>  pdb-script.py:2 <module>  
-> class Foo(object): -> class Foo(object):
 2  <string>:1 <module>  pdb-script.py:6 <module>    2  <string>:1 <module>  pdb-script.py:6 <module>  
--Call-- --Call--
-> class Foo(object): -> class Foo(object):
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:6 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> class Foo(object): -> class Foo(object):
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:6 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:6 Foo  
-> def __init__(self): -> def __init__(self):
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:7 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:7 Foo  
-> @classmethod -> @classmethod
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:13 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:13 Foo  
-> @staticmethod -> @staticmethod
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:17 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:17 Foo  
-> def bra(self): -> def bra(self):
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:21 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
--Return-- --Return--
-> def bra(self): -> def bra(self):
 3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:21 Foo    3  <string>:1 <module>  pdb-script.py:6 <module>  pdb-script.py:21 Foo  
-> def brah(): -> def brah():
 2  <string>:1 <module>  pdb-script.py:25 <module>    2  <string>:1 <module>  pdb-script.py:25 <module>  
-> f = Foo() -> f = Foo()
 2  <string>:1 <module>  pdb-script.py:29 <module>    2  <string>:1 <module>  pdb-script.py:29 <module>  
--Call-- --Call--
-> def __init__(self): -> def __init__(self):
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:7 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:7 __init__  
-> nop('__init__') -> nop('__init__')
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:8 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:8 __init__  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:2 nop    4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop    4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop    4  pdb-script.py:29 <module>  pdb-script.py:8 __init__  pdb-script.py:3 nop  
-> self.bar() -> self.bar()
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:9 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:9 __init__  
--Call-- --Call--
-> @classmethod -> @classmethod
 4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:13 bar    4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar    4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:2 nop    5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop    5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop    5  pdb-script.py:9 __init__  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar    4  pdb-script.py:29 <module>  pdb-script.py:9 __init__  pdb-script.py:15 bar  
-> self.baz() -> self.baz()
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:10 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:10 __init__  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:17 baz    4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz    4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:2 nop    5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop    5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop    5  pdb-script.py:10 __init__  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz    4  pdb-script.py:29 <module>  pdb-script.py:10 __init__  pdb-script.py:19 baz  
-> self.bra() -> self.bra()
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:11 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:21 bra    4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra    4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:2 nop    5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop    5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop    5  pdb-script.py:11 __init__  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra    4  pdb-script.py:29 <module>  pdb-script.py:11 __init__  pdb-script.py:22 bra  
--Return-- --Return--
-> self.bra() -> self.bra()
 3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:11 __init__    3  <string>:1 <module>  pdb-script.py:29 <module>  pdb-script.py:11 __init__  
-> Foo.bar() -> Foo.bar()
 2  <string>:1 <module>  pdb-script.py:30 <module>    2  <string>:1 <module>  pdb-script.py:30 <module>  
--Call-- --Call--
-> @classmethod -> @classmethod
 3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:13 bar    3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:15 bar    3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop    4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:30 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:15 bar    3  <string>:1 <module>  pdb-script.py:30 <module>  pdb-script.py:15 bar  
-> Foo.baz() -> Foo.baz()
 2  <string>:1 <module>  pdb-script.py:31 <module>    2  <string>:1 <module>  pdb-script.py:31 <module>  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:17 baz    3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:19 baz    3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop    4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:31 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:19 baz    3  <string>:1 <module>  pdb-script.py:31 <module>  pdb-script.py:19 baz  
-> Foo.bra(f) -> Foo.bra(f)
 2  <string>:1 <module>  pdb-script.py:32 <module>    2  <string>:1 <module>  pdb-script.py:32 <module>  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:21 bra    3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:22 bra    3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop    4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:32 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:22 bra    3  <string>:1 <module>  pdb-script.py:32 <module>  pdb-script.py:22 bra  
-> f.bar() -> f.bar()
 2  <string>:1 <module>  pdb-script.py:34 <module>    2  <string>:1 <module>  pdb-script.py:34 <module>  
--Call-- --Call--
-> @classmethod -> @classmethod
 3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:13 bar    3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:13 bar  
-> nop(cls.__name__) -> nop(cls.__name__)
 3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:15 bar    3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:15 bar  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop    4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop    4  pdb-script.py:34 <module>  pdb-script.py:15 bar  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(cls.__name__) -> nop(cls.__name__)
 3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:15 bar    3  <string>:1 <module>  pdb-script.py:34 <module>  pdb-script.py:15 bar  
-> f.baz() -> f.baz()
 2  <string>:1 <module>  pdb-script.py:35 <module>    2  <string>:1 <module>  pdb-script.py:35 <module>  
--Call-- --Call--
-> @staticmethod -> @staticmethod
 3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:17 baz    3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:17 baz  
-> nop(1) -> nop(1)
 3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:19 baz    3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:19 baz  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop    4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop    4  pdb-script.py:35 <module>  pdb-script.py:19 baz  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(1) -> nop(1)
 3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:19 baz    3  <string>:1 <module>  pdb-script.py:35 <module>  pdb-script.py:19 baz  
-> f.bra() -> f.bra()
 2  <string>:1 <module>  pdb-script.py:36 <module>    2  <string>:1 <module>  pdb-script.py:36 <module>  
--Call-- --Call--
-> def bra(self): -> def bra(self):
 3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:21 bra    3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:21 bra  
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:22 bra    3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:22 bra  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop    4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop    4  pdb-script.py:36 <module>  pdb-script.py:22 bra  pdb-script.py:3 nop  
--Return-- --Return--
-> nop(self.__class__.__name__) -> nop(self.__class__.__name__)
 3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:22 bra    3  <string>:1 <module>  pdb-script.py:36 <module>  pdb-script.py:22 bra  
-> brah() -> brah()
 2  <string>:1 <module>  pdb-script.py:38 <module>    2  <string>:1 <module>  pdb-script.py:38 <module>  
--Call-- --Call--
-> def brah(): -> def brah():
 3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:25 brah    3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:25 brah  
-> nop('brah') -> nop('brah')
 3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:26 brah    3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:26 brah  
--Call-- --Call--
-> def nop(_): -> def nop(_):
 4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:2 nop    4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:2 nop  
-> pass -> pass
 4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop    4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return-- --Return--
-> pass -> pass
 4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop    4  pdb-script.py:38 <module>  pdb-script.py:26 brah  pdb-script.py:3 nop  
--Return-- --Return--
-> nop('brah') -> nop('brah')
 3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:26 brah    3  <string>:1 <module>  pdb-script.py:38 <module>  pdb-script.py:26 brah 