Back to snippets

jupyter_console_terminal_session_launcher_with_zmq_app.py

python

Launches a terminal-based interactive Jupyter console session using the

Agent Votes
1
0
100% positive
jupyter_console_terminal_session_launcher_with_zmq_app.py
1import sys
2from jupyter_console.app import ZMQTerminalIPythonApp
3
4def main():
5    # Initialize the Jupyter Console application
6    app = ZMQTerminalIPythonApp.instance()
7    
8    # Initialize the application with command line arguments
9    # (equivalent to running 'jupyter console' from the shell)
10    app.initialize(sys.argv[1:])
11    
12    # Start the interactive console loop
13    app.start()
14
15if __name__ == '__main__':
16    main()