mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 19:53:22 +08:00
[0.2.x] fixed : IPython integrations bugs
git-svn-id: https://pykd.svn.codeplex.com/svn@85811 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
feb9e84a6e
commit
fd89d45dfe
@ -135,9 +135,13 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
|
||||
// Python debug output console helper classes
|
||||
python::class_<DbgOut>( "dout", "dout", python::no_init )
|
||||
.def( "write", &DbgOut::write );
|
||||
python::class_<DbgErr>( "dout", "dout", python::no_init )
|
||||
.def( "write", &DbgErr::write );
|
||||
.def( "write", &DbgOut::write )
|
||||
.def( "flush", &DbgOut::flush )
|
||||
.add_property( "encoding", &DbgOut::encoding );
|
||||
python::class_<DbgErr>( "derr", "derr", python::no_init )
|
||||
.def( "write", &DbgErr::write )
|
||||
.def( "flush", &DbgOut::flush )
|
||||
.add_property( "encoding", &DbgErr::encoding );
|
||||
python::class_<DbgIn>( "din", "din", python::no_init )
|
||||
.def( "readline", &DbgIn::readline )
|
||||
.add_property( "encoding", &DbgIn::encoding );
|
||||
|
@ -17,6 +17,13 @@ public:
|
||||
dprint( str );
|
||||
}
|
||||
|
||||
void flush() {
|
||||
}
|
||||
|
||||
std::string
|
||||
encoding() {
|
||||
return "ascii";
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -30,6 +37,14 @@ public:
|
||||
{
|
||||
eprint( str );
|
||||
}
|
||||
|
||||
void flush() {
|
||||
}
|
||||
|
||||
std::string
|
||||
encoding() {
|
||||
return "ascii";
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1,14 +1,20 @@
|
||||
from IPython.config.loader import Config
|
||||
from IPython.terminal.embed import InteractiveShellEmbed
|
||||
from pykd import *
|
||||
|
||||
from IPython.terminal.interactiveshell import TerminalInteractiveShell
|
||||
|
||||
import pykd
|
||||
|
||||
cfg = Config()
|
||||
|
||||
cfg.InteractiveShell.colors = 'NoColor'
|
||||
cfg.InteractiveShell.readline_use = False
|
||||
cfg.InteractiveShell.autoindent = True
|
||||
|
||||
cfg.PromptManager.in_template = 'In <\\#>: '
|
||||
cfg.PromptManager.in2_template = ' .\\D.: '
|
||||
cfg.PromptManager.out_template = 'Out<\\#>: '
|
||||
|
||||
ipshell = InteractiveShellEmbed(config=cfg)
|
||||
|
||||
ipshell()
|
||||
ipshell()
|
Loading…
Reference in New Issue
Block a user