discoverd after question on list :
in notebook, dooin this in js :
IPython.notebook.kernel.execute('',
{'execute_reply':function(data){console.log('data:',data)}},
{'user_expressions':
{'foo':'a=1'} # interesting part
})
result in
...
foo: "[ERROR] SyntaxError: invalid syntax (<string>, line 1)"
...
in response.
1+1 does work, but more interesting things like !ls, get_ipython().system(u'ls') ... etc does not.
discoverd after question on list :
in notebook, dooin this in js :
result in
in response.
1+1does work, but more interesting things like!ls,get_ipython().system(u'ls')... etc does not.