Notebook StdIn support to fix #5231 (#5232)

Fixes #5231 
- Add stdin handling. Has to be at UI level so add plumb through handling
- Add unit tests
- Add new StdIn component.

Testing:
Unit Tests and manual testing of following:
- Prompt for password using `getpass` in python.
   - Password prompt is hidden since "password" is true.
   - Hit enter, it completes
- prompt, stop cell running, StdIn disappears
- prompt, hit escape, stdIn disappears and stdIn request is handled.

Issues: focus isn't always set to the input even though we call focus.
Will investigate this further.
This commit is contained in:
Kevin Cunnane
2019-04-30 14:57:27 -07:00
committed by GitHub
parent b21125ff2d
commit 64416e05c1
11 changed files with 285 additions and 5 deletions

View File

@@ -447,6 +447,7 @@ export interface ICellModel {
readonly executionState: CellExecutionState;
readonly notebookModel: NotebookModel;
setFuture(future: FutureInternal): void;
setStdInHandler(handler: nb.MessageHandler<nb.IStdinMessage>): void;
runCell(notificationService?: INotificationService, connectionManagementService?: IConnectionManagementService): Promise<boolean>;
setOverrideLanguage(language: string);
equals(cellModel: ICellModel): boolean;