From 786cc9b8f793f608098c1da97cb564e7d24b15cd 2013-07-04 19:23:31 From: MinRK Date: 2013-07-04 19:23:31 Subject: [PATCH] add IPython.start_ipython A public API for starting a real (non-embedded) IPython instance. should avoid API breakage in the future due to simple module renames as has just happened with the removal of frontend --- diff --git a/IPython/__init__.py b/IPython/__init__.py index c804cd4..b646c76 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -84,3 +84,23 @@ def embed_kernel(module=None, local_ns=None, **kwargs): # Only import .zmq when we really need it from IPython.kernel.zmq.embed import embed_kernel as real_embed_kernel real_embed_kernel(module=module, local_ns=local_ns, **kwargs) + +def start_ipython(argv=None, **kwargs): + """launch a normal IPython instance (as opposed to embedded) + + This is a public API method, and will survive implementation changes. + + + Parameters + ---------- + + argv : list or None, optional + If unspecified or None, IPython will parse command-line options from sys.argv. + To prevent any command-line parsing, pass an empty list: `argv=[]`. + + kwargs : various, optional + Any other kwargs will be passed to the Application constructor, + such as `config`. + """ + from IPython.terminal.ipapp import launch_new_instance + return launch_new_instance(argv=argv, **kwargs)