KEMBAR78
Support stdin in jupyter messages · Issue #2664 · microsoft/vscode-jupyter · GitHub
Skip to content

Support stdin in jupyter messages #2664

@rchiodo

Description

@rchiodo

I'm guessing 3 days to implement this.

I think all we need to do is change this code to allow_stdin:

    private generateRequest = (code: string, silent?: boolean): Kernel.IFuture | undefined => {
        //traceInfo(`Executing code in jupyter : ${code}`);
        try {
            const cellMatcher = new CellMatcher(this.configService.getSettings().datascience);
            return this.session ? this.session.requestExecute(
                {
                    // Remove the cell marker if we have one.
                    code: cellMatcher.stripFirstMarker(code),
                    stop_on_error: false,
                    allow_stdin: false,
                    store_history: !silent // Silent actually means don't output anything. Store_history is what affects execution_count
                },
                true
            ) : undefined;
        } catch (exc) {
            // Any errors generating a request should just be logged. User can't do anything about it.
            traceError(exc);
        }

        return undefined;
    }

Then provide UI to do the input.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions