TenjintShell¶
-
class
tenjint.plugins.interactive.
TenjintShell
(**kwargs)[source]¶ Attributes
A trait whose value must be an instance of a specified class.
Get a list of references to all the namespace dictionaries in which IPython might store a user-created object.
An enum whose value must be in a given sequence.
An instance of a Python list.
An enum whose value must be in a given sequence.
A boolean (True, False) trait.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
An int trait.
Control auto-activation of pdb at exceptions
A boolean (True, False) trait.
An enum of strings where the case should be ignored.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
A contextmanager for running a block with our cross validation lock set to True.
TenjintShell.data_pub_class
A boolean (True, False) trait.
Modified Pdb class, does not load readline.
A boolean (True, False) trait.
A casting version of the boolean trait.
An enum whose value must be in a given sequence.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
A trait whose value must be a subclass of a specified class.
A trait whose value must be an instance of a specified class.
A trait whose value must be a subclass of a specified class.
A boolean (True, False) trait.
A trait for unicode strings.
A trait for unicode strings.
A casting version of the boolean trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
An int trait.
A trait for unicode strings.
A boolean (True, False) trait.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
A trait for unicode strings.
A trait which allows any value.
A boolean (True, False) trait.
A trait type representing a Union type.
An instance of a Python dict.
An int trait.
An int trait.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
A trait whose value must be an instance of a specified class.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
An enum whose value must be in a given sequence.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A boolean (True, False) trait.
A trait whose value must be an instance of a specified class.
A trait whose value must be an instance of a specified class.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A trait whose value must be an instance of a specified class.
A trait whose value must be a subclass of a specified class.
A boolean (True, False) trait.
A boolean (True, False) trait.
A Unicode subclass to validate separate_in, separate_out, etc.
A Unicode subclass to validate separate_in, separate_out, etc.
A Unicode subclass to validate separate_in, separate_out, etc.
A casting version of the boolean trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
An int trait.
A boolean (True, False) trait.
A boolean (True, False) trait.
A trait for unicode strings.
A boolean (True, False) trait.
A boolean (True, False) trait.
An enum of strings where the case should be ignored.
Methods
TenjintShell.__init__
(**kwargs)Create a configurable given a config config.
TenjintShell.add_traits
(**traits)Dynamically add trait attributes to the HasTraits instance.
TenjintShell.ask_yes_no
(prompt[, default, …])This will be executed at the time of exit.
Overridden from the parent class to use fancy rewriting prompt
Return whether a block of code is ready to execute, or should be continued
Generate rST documentation for this class’ config options.
Get the config class config section
TenjintShell.class_get_help
([inst])Get the help string for this class in ReST format.
TenjintShell.class_get_trait_help
(trait[, inst])Get the help string for a single trait.
Get a dict of all event handlers defined on this class, not a parent.
TenjintShell.class_own_traits
(**metadata)Get a dict of all the traitlets defined on this class, not a parent.
TenjintShell.class_print_help
([inst])Get the help string for a single trait and print it.
TenjintShell.class_trait_names
(**metadata)Get a list of all the names of this class’ traits.
TenjintShell.class_traits
(**metadata)Get a
dict
of all the traits of this class.unset _instance for this class and singleton parents.
Clear the cache of main modules.
TenjintShell.complete
(text[, line, cursor_pos])Return the completed text and a list of completions.
TenjintShell.debugger
([force])Call the pdb debugger.
TenjintShell.define_macro
(name, themacro)Define a new macro
TenjintShell.del_var
(varname[, by_name])Delete a variable from the various namespaces, so that, as far as possible, we’re not keeping any hidden references to it.
TenjintShell.drop_by_id
(variables)Remove a dict of variables from the user namespace, if they are the same as the values in the dictionary.
TenjintShell.enable_gui
([gui])Enable interactive matplotlib and inline figure support.
TenjintShell.enable_pylab
([gui, import_all, …])Activate pylab support at runtime.
TenjintShell.ev
(expr)Evaluate python expression expr in user namespace.
TenjintShell.ex
(cmd)Execute a normal python statement in user namespace.
TenjintShell.excepthook
(etype, value, tb)One more defense for GUI apps that call sys.excepthook.
TenjintShell.extract_input_lines
(range_str)Return as a string a set of input history slices.
TenjintShell.find_cell_magic
(magic_name)Find and return a cell magic by name.
TenjintShell.find_line_magic
(magic_name)Find and return a line magic by name.
TenjintShell.find_magic
(magic_name[, magic_kind])Find and return a magic of the given type by name.
TenjintShell.find_user_code
(target[, raw, …])Get a code string from history, file, url, or a string or macro.
TenjintShell.get_exception_only
([exc_tuple])Return as a string (ending with a newline) the exception that just occurred, without any traceback.
Return the currently running IPython instance.
TenjintShell.getoutput
(cmd[, split, depth])Get output (possibly including stderr) from a subprocess.
TenjintShell.has_trait
(name)Returns True if the object has a trait with the specified name.
Context manager for bundling trait change notifications and cross validation.
Initialize the completion machinery.
TenjintShell.init_data_pub
()register default filter for deprecation warning.
Any changes we need to make to the user’s environment.
Sets up the command history, and starts regular autosaves.
TenjintShell.init_ipython_dir
(ipython_dir)Initialize logging in case it was requested at the command line.
TenjintShell.init_profile_dir
(profile_dir)DEPRECATED
Explicitly overwrite
IPython.core.interactiveshell
to do nothing.Initialize all user-visible namespaces to their minimum defaults.
Add a virtualenv to sys.path so the user can import modules from it.
Has an instance been created?
TenjintShell.inputhook
(context)TenjintShell.instance
(*args, **kwargs)Returns a global instance of this class.
TenjintShell.interact
([display_banner])TenjintShell.magic
(arg_s)DEPRECATED.
TenjintShell.mainloop
([local_ns, module, …])Embeds IPython into a running python program.
TenjintShell.mktempfile
([data, prefix])Make a new tempfile and return its filename.
TenjintShell.new_main_mod
(filename, modname)Return a new ‘main’ module object for user code execution.
TenjintShell.notify_change
(change)TenjintShell.object_inspect
(oname[, …])Get object info about oname
TenjintShell.object_inspect_mime
(oname[, …])Get object info as a mimebundle of formatted representations.
TenjintShell.object_inspect_text
(oname[, …])Get object info as formatted text
TenjintShell.observe
(handler[, names, type])Setup a handler to be called when a trait changes.
TenjintShell.on_trait_change
([handler, …])DEPRECATED: Setup a handler to be called when a trait changes.
Prepare the module and namespace in which user code will be run.
TenjintShell.push
(variables[, interactive])Inject a group of variables into the IPython user namespace.
TenjintShell.register_magic_function
(func[, …])Expose a standalone function as magic function for IPython.
DEPRECATED: Use ip.events.register(‘post_run_cell’, func)
TenjintShell.reset
([new_session])Clear all internal namespaces, and attempt to release references to user objects.
TenjintShell.reset_selective
([regex])Clear selective variables from internal namespaces based on a specified regular expression.
Restore the state of the sys module.
TenjintShell.run_ast_nodes
(nodelist, cell_name)Run a sequence of AST nodes.
TenjintShell.run_cell
(raw_cell[, …])Run a complete IPython cell.
TenjintShell.run_cell_magic
(magic_name, …)Execute the given cell magic.
TenjintShell.run_code
(code_obj[, result])Execute a code object.
TenjintShell.run_line_magic
(magic_name, line)Execute the given line magic.
TenjintShell.runcode
(code_obj[, result])Execute a code object.
TenjintShell.safe_execfile
(fname, *where[, …])A safe version of the builtin execfile().
TenjintShell.safe_execfile_ipy
(fname[, …])Like safe_execfile, but for .ipy or .ipynb files with IPython syntax.
TenjintShell.safe_run_module
(mod_name, where)A safe version of runpy.run_module().
Save the state of hooks in the sys module.
return section names as a list
TenjintShell.set_autoindent
([value])Set the autoindent flag.
TenjintShell.set_completer_frame
([frame])Set the frame of the completer.
TenjintShell.set_custom_completer
(completer)Adds a new custom completer function.
TenjintShell.set_custom_exc
(exc_tuple, handler)Set a custom exception handler, which will be called if any of the exceptions in exc_tuple occur in the mainloop (specifically, in the run_code() method).
TenjintShell.set_hook
(name,hook)IPython exposes some of its internal API as user-modifiable hooks.
TenjintShell.set_next_input
(s[, replace])Sets the ‘default’ input string for the next command line.
TenjintShell.set_trait
(name, value)Forcibly sets trait attribute, including read-only attributes.
TenjintShell.setup_instance
(*args, **kwargs)This is called before self.__init__ is called.
TenjintShell.show_banner
([banner])Show a usage message
Show a short message for UsageErrors
Called by _run_cell when there’s an IndentationError in code entered at the prompt.
TenjintShell.showsyntaxerror
([filename, …])Display the syntax error that just occurred.
TenjintShell.showtraceback
([exc_tuple, …])Display the exception that just occurred.
Switch prompts to classic for %doctest_mode
TenjintShell.system
(cmd)Call the given cmd in a subprocess using os.system on Windows or subprocess.call using the system shell on other platforms.
Call the given cmd in a subprocess, piping stdout/err
Call the given cmd in a subprocess using os.system on Windows or subprocess.call using the system shell on other platforms.
TenjintShell.trait_events
([name])Get a
dict
of all the event handlers of this class.TenjintShell.trait_metadata
(traitname, key)Get metadata values for trait by key.
TenjintShell.trait_names
(**metadata)Get a list of all the names of this class’ traits.
TenjintShell.traits
(**metadata)Get a
dict
of all the traits of this class.Apply the AST transformations from self.ast_transformers
TenjintShell.unobserve
(handler[, names, type])Remove a trait change handler.
TenjintShell.unobserve_all
([name])Remove trait change handlers of any type for the specified name.
TenjintShell.update_config
(config)Update config and load the new values
TenjintShell.user_expressions
(expressions)Evaluate a dict of expressions in the user’s namespace.
TenjintShell.var_expand
(cmd[, depth, formatter])Expand python variables in a string.
TenjintShell.write
(data)DEPRECATED: Write a string to the default output
TenjintShell.write_err
(data)DEPRECATED: Write a string to the default error output