The wx.py package defines sys.ps* to use for the various prompts. To use introspect separately you need to do the same in your code. (i.e sys.ps1=‘>>>’, sys.ps2 = '… ', sys.ps3 = '<-- '). You may want to look at the code and see how introspect is used by pyshell, ect…
···
On Wed, Oct 1, 2008 at 2:04 PM, Stef Mientki s.mientki@ru.nl wrote:
The wx.py package defines sys.ps <http://sys.ps>* to use for the various prompts. To use introspect separately you need to do the same in your code. (i.e sys.ps1='>>>', sys.ps2 = '... ', sys.ps3 = '<-- '). You may want to look at the code and see how introspect is used by pyshell, ect...
thanks Cody,
I'm beginning to understand the code ..
... but I find this a little bit weird programming technique
The wx.py package defines sys.ps <http://sys.ps>* to use for the various prompts. To use introspect separately you need to do the same in your code. (i.e sys.ps1='>>>', sys.ps2 = '... ', sys.ps3 = '<-- '). You may want to look at the code and see how introspect is used by pyshell, ect...
thanks Cody,
I'm beginning to understand the code ..
I indeed think I understand a lot more now,
probably also why code completion in editra is not working on my system wxPython 2.8.7.1 (msw-unicode),
but I've to admit I don't really understand this kind of code very well:
In introspect the following code is used, which I shameless copied:
def getCallTip(command='', locals=None):
"""For a command, return a tuple of object name, argspec, tip text.
The call tip information will be based on the locals namespace."""
calltip = ('', '', '') # object name, argspec, tip text.
# Get the proper chunk of code from the command.
root = getRoot(command, terminator='(')
try:
if locals is not None:
object = eval(root, locals) #<<<===== problems
now this always returns nothing.
If I change "locals" to " locals()" everything works perfect.