def load_ipython_extension(ip):
    """

    IPython pretty printing support (optional). To load the extension
    you may execute the following in IPython:

    %load_ext lancet
    """
    global _loaded
    if not _loaded:
        _loaded = True
        from lancet import launch
        if sys.version_info[0] == 2:
            launch.input = lambda *args, **kwargs: raw_input(*args, **kwargs)

        plaintext_formatter = ip.display_formatter.formatters['text/plain']
        plaintext_formatter.for_type(Args, repr_pretty_annotated)
        plaintext_formatter.for_type(Command, repr_pretty_unannotated)
        plaintext_formatter.for_type(Launcher, repr_pretty_unannotated)
        plaintext_formatter.for_type(FileType, repr_pretty_unannotated)
        plaintext_formatter.for_type(review_and_launch, repr_pretty_unannotated)
def load_ipython_extension ( ip ) : global _loaded if not _loaded : _loaded = True from lancet import launch if sys . version_info [ 0 ] == 2 : launch . input = lambda * args , ** kwargs : raw_input ( * args , ** kwargs ) plaintext_formatter = ip . display_formatter . formatters [ 'text/plain' ] plaintext_formatter . for_type ( Args , repr_pretty_annotated ) plaintext_formatter . for_type ( Command , repr_pretty_unannotated ) plaintext_formatter . for_type ( Launcher , repr_pretty_unannotated ) plaintext_formatter . for_type ( FileType , repr_pretty_unannotated ) plaintext_formatter . for_type ( review_and_launch , repr_pretty_unannotated )
IPython pretty printing support (optional). To load the extension
    you may execute the following in IPython:

    %load_ext lancet