Skip to content

Commit e92c539

Browse files
committed
check in current status
1 parent 5b76e4a commit e92c539

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/client/repl/pythonServer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import * as ch from 'child_process';
33
import * as rpc from 'vscode-jsonrpc/node';
44
import { Disposable } from 'vscode';
55

6-
const SERVER_PATH = path.join(__dirname, '...', 'python_files', 'python_server.py');
6+
// const SERVER_PATH = path.join(__dirname, '...', 'python_files', 'python_server.py');
7+
const SERVER_PATH = path.join(__dirname, '..', '..', 'pythonFiles', 'python_server.py');
8+
9+
// const SERVER_PATH = path.join(__dirname, '..', '..', '..', 'pythonFiles', 'python_server.py');
710

811
export interface PythonServer extends Disposable {
912
execute(code: string): Promise<string>;

src/client/repl/replCommands.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { commands, Uri } from 'vscode';
1+
import { commands, Uri, workspace } from 'vscode';
22
import { Disposable } from 'vscode-jsonrpc';
33
import { Commands } from '../common/constants';
44
import { IInterpreterService } from '../interpreter/contracts';
5-
import { startRepl } from './replController';
5+
import { createReplController, startRepl } from './replController';
66

77
export function registerReplCommands(disposables: Disposable[], interpreterService: IInterpreterService): void {
88
disposables.push(
@@ -11,6 +11,8 @@ export function registerReplCommands(disposables: Disposable[], interpreterServi
1111
if (interpreter) {
1212
const interpreterPath = interpreter.path;
1313
// How do we get instance of interactive window from Python extension?
14+
const ourController = createReplController(interpreterPath);
15+
1416
// How to go from user clicking Run Python --> Run selection/line via Python REPL -> IW opening
1517

1618
// TODO: Find interactive window, or open it
@@ -21,6 +23,9 @@ export function registerReplCommands(disposables: Disposable[], interpreterServi
2123

2224
// TODO: execute the cell
2325
}
26+
// workspace.onDidOpenNotebookDocument;
27+
await workspace.openNotebookDocument('interactive');
28+
// await window.showNotebookDocument()
2429
}),
2530
);
2631
}

src/client/repl/replController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function createReplController(interpreterPath: string): vscode.NotebookCo
66
const controller = vscode.notebooks.createNotebookController('pythonREPL', 'interactive', 'Python REPL');
77
controller.supportedLanguages = ['python'];
88
controller.supportsExecutionOrder = true;
9-
controller.description = 'GitHub';
9+
controller.description = 'Python REPL';
1010

1111
controller.executeHandler = async (cells) => {
1212
for (const cell of cells) {

0 commit comments

Comments
 (0)