I'd like to use jupyter_client to execute some python code and get result. Here's my sample code. But I could not get the output hello world
, Could anyone help me ? Thanks
import jupyter_client
kernel_manager, kernel_client = jupyter_client.manager.start_new_kernel(kernel_name='python3')
kernel_client.execute("print('hello world')")
kernel_client.get_shell_msg()
The output wont be on the standard output, it will be in a result object. Check this snippet: https://www.snip2code.com/Snippet/1169700/sample-code-for-jupyter_client