That got rid of the error message. A step in the right direction!
Still, funny behavior: nothing comes out in the Leo log, and the output
does not come out in the ipython console either; but when I hit enter in
the ipython console, one line from the leo code prints out (the first). I
can tell that the complete node is going over to ipython because the
function works in ipython (the testit function). Just no Out or printout on
either end.
My node has this body:
x="Wow!"
print "new Bill", x
def testit(x):
return x.upper()
testit('hello world')
Here is the ipython side. Notice the "new" in front of anything from Leo
that does finally print out in the ipython console.
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
Type "copyright", "credits" or "license" for more information.
IPython 0.12.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
%guiref -> A brief reference about the graphical user interface.
In [0]:
new Bill Wow!
In [0]:
In [0]:
In [1]: testit("wow")
Out[1]: 'WOW'
In [1]: {ran again}
new Bill Wow!
Le lundi 29 avril 2013 15:07:46 UTC-7, Ville M. Vainio a écrit :
>
> Try alt-x ipython-exec instead
> On Apr 30, 2013 12:35 AM, "wgw" <[email protected] <javascript:>> wrote:
>
>> I ran leoLauncher.py --ipython and everything seemed to work: the
>> ipython window popped up and no error messages. Just this comment in the
>> startup terminal:
>>
>>
>> [IPKernelApp] To connect another client to this kernel, use:
>>
>> [IPKernelApp] --existing kernel-16687.json
>>
>> When I tried to run some code from Leo (alt-I), I got an error (see
>> traceback below). But if I continued, sometimes printing would appear, and
>> sometimes I had to hit enter in the ipython console to get a line to print.
>> The function definitions did not seem to go at all.
>>
>>
>> Any suggestions?
>>
>>
>> I am using the bzr version of Leo only, on Ubuntu Precise, python 2.7 : Leo
>> 4.11 devel, build 5752, 2013-04-26 23:46:30
>>
>> exception executing command
>> Traceback (most recent call last):
>> File "/data2/Soft/leo-editor/trunk3/leo/core/leoCommands.py", line 560,
>> in doCommand
>> val = command(event)
>> File "/data2/Soft/leo-editor/trunk3/leo/core/leoCommands.py", line
>> 1170, in minibufferCallback
>> retval = function(keywords)
>> File "/data2/Soft/leo-editor/trunk3/leo/core/leoIPython.py", line 876,
>> in pushToIPythonCommand
>> startIPython(event=event)
>> File "/data2/Soft/leo-editor/trunk3/leo/core/leoIPython.py", line 864,
>> in startIPython
>> g_ipm.start_new_api()
>> File "/data2/Soft/leo-editor/trunk3/leo/core/leoIPython.py", line 289,
>> in start_new_api
>> ipapp.launch_new_instance()
>> File
>> "/usr/lib/python2.7/dist-packages/IPython/frontend/terminal/ipapp.py", line
>> 401, in launch_new_instance
>> app = TerminalIPythonApp.instance()
>> File "/usr/lib/python2.7/dist-packages/IPython/config/configurable.py",
>> line 329, in instance
>> '%s are being created.' % cls.__name__
>> MultipleInstanceError: Multiple incompatible subclass instances of
>> TerminalIPythonApp are being created.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/leo-editor?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.