mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-05-14 06:53:23 +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 debug output console helper classes
|
||||||
python::class_<DbgOut>( "dout", "dout", python::no_init )
|
python::class_<DbgOut>( "dout", "dout", python::no_init )
|
||||||
.def( "write", &DbgOut::write );
|
.def( "write", &DbgOut::write )
|
||||||
python::class_<DbgErr>( "dout", "dout", python::no_init )
|
.def( "flush", &DbgOut::flush )
|
||||||
.def( "write", &DbgErr::write );
|
.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 )
|
python::class_<DbgIn>( "din", "din", python::no_init )
|
||||||
.def( "readline", &DbgIn::readline )
|
.def( "readline", &DbgIn::readline )
|
||||||
.add_property( "encoding", &DbgIn::encoding );
|
.add_property( "encoding", &DbgIn::encoding );
|
||||||
|
@ -17,6 +17,13 @@ public:
|
|||||||
dprint( str );
|
dprint( str );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void flush() {
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
encoding() {
|
||||||
|
return "ascii";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
@ -30,6 +37,14 @@ public:
|
|||||||
{
|
{
|
||||||
eprint( str );
|
eprint( str );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void flush() {
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
encoding() {
|
||||||
|
return "ascii";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
from IPython.config.loader import Config
|
from IPython.config.loader import Config
|
||||||
from IPython.terminal.embed import InteractiveShellEmbed
|
from IPython.terminal.embed import InteractiveShellEmbed
|
||||||
from pykd import *
|
|
||||||
|
from IPython.terminal.interactiveshell import TerminalInteractiveShell
|
||||||
|
|
||||||
|
import pykd
|
||||||
|
|
||||||
cfg = Config()
|
cfg = Config()
|
||||||
|
|
||||||
cfg.InteractiveShell.colors = 'NoColor'
|
cfg.InteractiveShell.colors = 'NoColor'
|
||||||
|
cfg.InteractiveShell.readline_use = False
|
||||||
|
cfg.InteractiveShell.autoindent = True
|
||||||
|
|
||||||
cfg.PromptManager.in_template = 'In <\\#>: '
|
cfg.PromptManager.in_template = 'In <\\#>: '
|
||||||
cfg.PromptManager.in2_template = ' .\\D.: '
|
cfg.PromptManager.in2_template = ' .\\D.: '
|
||||||
cfg.PromptManager.out_template = 'Out<\\#>: '
|
cfg.PromptManager.out_template = 'Out<\\#>: '
|
||||||
|
Loading…
Reference in New Issue
Block a user