gui.wx.ipshell_nonblocking — IPython v0.10 documentation

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »

# gui.wx.ipshell_nonblocking

## Module: `gui.wx.ipshell_nonblocking`

Inheritance diagram for `IPython.gui.wx.ipshell_nonblocking`:

Provides IPython remote instance.

@author: Laurent Dufrechou laurent.dufrechou _at_ gmail.com @license: BSD

All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, and is available at U{http://www.opensource.org/licenses/bsd-license.php}

## `NonBlockingIPShell`

class `IPython.gui.wx.ipshell_nonblocking.` `NonBlockingIPShell`(argv=[], user_ns={}, user_global_ns=None, cin=None, cout=None, cerr=None, ask_exit_handler=None)

  Bases: `object`

  Create an IPython instance, running the commands in a separate, non-blocking thread. This allows embedding in any GUI without blockage.

  Note: The ThreadEx class supports asynchroneous function call
    via raise_exc()
  `__init__`(argv=[], user_ns={}, user_global_ns=None, cin=None, cout=None, cerr=None, ask_exit_handler=None)
    @param argv: Command line options for IPython @type argv: list @param user_ns: User namespace. @type user_ns: dictionary @param user_global_ns: User global namespace. @type user_global_ns: dictionary. @param cin: Console standard input. @type cin: IO stream @param cout: Console standard output. @type cout: IO stream @param cerr: Console standard error. @type cerr: IO stream @param exit_handler: Replacement for builtin exit() function @type exit_handler: function @param time_loop: Define the sleep time between two thread’s loop @type int
  `complete`(line)

    Returns an auto completed line and/or posibilities for completion.

    @param line: Given line so far. @type line: string

    @return: Line completed as for as possible, and possible further completions. @rtype: tuple

  `do_execute`(line)
    Tell the thread to process the ‘line’ command
  `get_banner`()

    Returns the IPython banner for useful info on IPython instance

    @return: The banner string. @rtype: string

  `get_doc_text`()

    Returns the output of the processing that need to be paged (if any)

    @return: The std output string. @rtype: string

  `get_help_text`()

    Returns the output of the processing that need to be paged via help pager(if any)

    @return: The std output string. @rtype: string

  `get_indentation`()

    Returns the current indentation level Usefull to put the caret at the good start position if we want to do autoindentation.

    @return: The indentation level. @rtype: int

  `get_prompt`()

    Returns current prompt inside IPython instance (Can be In [...]: ot ...:)

    @return: The current prompt. @rtype: string

  `get_prompt_count`()

    Returns the prompt number. Each time a user execute a line in the IPython shell the prompt count is increased

    @return: The prompt number @rtype: int

  `get_threading`()

    Returns threading status, is set to True, then each command sent to the interpreter will be executed in a separated thread allowing, for example, breaking a long running commands. Disallowing it, permits better compatibilty with instance that is embedding IPython instance.

    @return: Execution method @rtype: bool

  `history_back`()

    Provides one history command back.

    @return: The command string. @rtype: string

  `history_forward`()

    Provides one history command forward.

    @return: The command string. @rtype: string

  `init_history_index`()
    set history to last command entered
  `init_ipython0`(argv=[], user_ns={}, user_global_ns=None, cin=None, cout=None, cerr=None, ask_exit_handler=None)
    Initialize an ipython0 instance
  `set_threading`(state)

    Sets threading state, if set to True, then each command sent to the interpreter will be executed in a separated thread allowing, for example, breaking a long running commands. Disallowing it, permits better compatibilty with instance that is embedding IPython instance.

    @param state: Sets threading state @type bool

  `update_namespace`(ns_dict)

    Add the current dictionary to the shell namespace.

    @param ns_dict: A dictionary of symbol-values. @type ns_dict: dictionary

### Navigation

- index
- modules |
- next |
- previous |
- IPython v0.10 documentation »
- The IPython API »