File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 104104 "title" : " Sort Imports" 
105105 "category" : " Python Refactor" 
106106 },
107+  {
108+  "command" : " python.startREPL" 
109+  "title" : " Start REPL" 
110+  "category" : " Python" 
111+  },
107112 {
108113 "command" : " python.buildWorkspaceSymbols" 
109114 "title" : " Build Workspace Symbols" 
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export namespace Commands {
2323 export  const  Refaactor_Extract_Method  =  'python.refactorExtractMethod' ; 
2424 export  const  Update_SparkLibrary  =  'python.updateSparkLibrary' ; 
2525 export  const  Build_Workspace_Symbols  =  'python.buildWorkspaceSymbols' ; 
26+  export  const  Start_REPL  =  'python.startREPL' ; 
2627 export  namespace  Jupyter  { 
2728 export  const  Get_All_KernelSpecs_For_Language  =  'jupyter:getAllKernelSpecsForLanguage' ; 
2829 export  const  Get_All_KernelSpecs  =  'jupyter:getAllKernelSpecs' ; 
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import * as telemetryContracts from './common/telemetryContracts';
1717import  {  activateSimplePythonRefactorProvider  }  from  './providers/simpleRefactorProvider' ; 
1818import  {  activateSetInterpreterProvider  }  from  './providers/setInterpreterProvider' ; 
1919import  {  activateExecInTerminalProvider  }  from  './providers/execInTerminalProvider' ; 
20+ import  {  Commands  }  from  './common/constants' ; 
2021import  *  as  tests  from  './unittests/main' ; 
2122import  *  as  jup  from  './jupyter/main' ; 
2223import  {  HelpProvider  }  from  './helpProvider' ; 
@@ -59,6 +60,12 @@ export function activate(context: vscode.ExtensionContext) {
5960 activateSimplePythonRefactorProvider ( context ,  formatOutChannel ) ; 
6061 context . subscriptions . push ( activateFormatOnSaveProvider ( PYTHON ,  settings . PythonSettings . getInstance ( ) ,  formatOutChannel ) ) ; 
6162
63+  context . subscriptions . push ( vscode . commands . registerCommand ( Commands . Start_REPL ,  ( )  =>  { 
64+  let  term  =  vscode . window . createTerminal ( 'Python' ,  pythonSettings . pythonPath ) ; 
65+  term . show ( ) ; 
66+  context . subscriptions . push ( term ) ;  
67+  } ) ) ; 
68+ 
6269 // Enable indentAction 
6370 vscode . languages . setLanguageConfiguration ( PYTHON . language ,  { 
6471 onEnterRules : [ 
                         You can’t perform that action at this time. 
           
                  
0 commit comments