Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Migrate prompt parsing logic to IPython.core.InteractiveShell #12

@osolmaz

Description

@osolmaz

Currently, prompt parsing and interactive features such as package auto-installing, executing, etc. happen outside IPython parser. This has the following disadvantages:

  • Prompts themselves are not stored in the history, but the Python code they resolve to
  • The global and local namespaces have to be passed to ICortex.eval_prompt() in order to execute the Python code returned from services—if we implement the following steps, they can be accessed directly in the overloaded InteractiveShell

Steps:

  • Create an overloaded version of IPython.core.inputtransformer2 and migrate prompt parsing logic in there
  • Create an overloaded version of IPython.core.InteractiveShell which uses the overloaded inputtransformer2 and migrate interactive ICortex logic in there
  • Modify ICortexShell to use the overloaded InteractiveShell

This will most likely simplify ICortexShell.do_execute() and resolve #10 automatically.

Possible issues:

  • Will the interactive features (input() from the user) continue to work smoothly in both the shell and notebooks?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthigh priorityIssues that need immediate attention

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions