File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 },
6060 {
6161 "command" : " python.setInterpreter" ,
62- "title" : " Set Workspace Interpreter" ,
62+ "title" : " Select Workspace Interpreter" ,
6363 "category" : " Python"
6464 },
6565 {
236236 "type" : " python" ,
237237 "request" : " launch" ,
238238 "stopOnEntry" : true ,
239- "pythonPath" : " ${config.python.pythonPath}" ,
239+ "pythonPath" : " ${config.python.pythonPath}" ,
240240 "program" : " ${file}" ,
241241 "debugOptions" : [
242242 " WaitOnAbnormalExit" ,
249249 "type" : " python" ,
250250 "request" : " launch" ,
251251 "stopOnEntry" : true ,
252- "pythonPath" : " ${config.python.pythonPath}" ,
252+ "pythonPath" : " ${config.python.pythonPath}" ,
253253 "program" : " ${file}" ,
254254 "externalConsole" : true ,
255255 "debugOptions" : [
262262 "type" : " python" ,
263263 "request" : " launch" ,
264264 "stopOnEntry" : true ,
265- "pythonPath" : " ${config.python.pythonPath}" ,
265+ "pythonPath" : " ${config.python.pythonPath}" ,
266266 "program" : " ${workspaceRoot}/manage.py" ,
267267 "args" : [
268268 " runserver" ,
280280 "type" : " python" ,
281281 "request" : " launch" ,
282282 "stopOnEntry" : true ,
283- "pythonPath" : " ${config.python.pythonPath}" ,
283+ "pythonPath" : " ${config.python.pythonPath}" ,
284284 "program" : " ${workspaceRoot}/console.py" ,
285285 "args" : [
286286 " dev" ,
301301 "remoteRoot" : " ${workspaceRoot}" ,
302302 "port" : 3000 ,
303303 "secret" : " my_secret" ,
304- "host" :" localhost"
304+ "host" : " localhost"
305305 }
306306 ]
307307 }
599599 "test" : " node ./node_modules/vscode/bin/test"
600600 },
601601 "dependencies" : {
602+ "copy-paste" : " ^1.3.0" ,
602603 "diff-match-patch" : " ^1.0.0" ,
603604 "fs-extra" : " ^0.30.0" ,
604605 "line-by-line" : " ^0.1.4" ,
618619 "typescript" : " ^1.8.5" ,
619620 "vscode" : " ^0.11.0"
620621 }
621- }
622+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as path from "path";
44import * as vscode from "vscode" ;
55import * as settings from "./../common/configSettings" ;
66import * as utils from "./../common/utils" ;
7+ let ncp = require ( "copy-paste" ) ;
78
89// where to find the Python binary within a conda env
910const CONDA_RELATIVE_PY_PATH = utils . IS_WINDOWS ? [ 'python' ] : [ 'bin' , 'python' ]
@@ -69,10 +70,16 @@ function suggestPythonPaths(): Promise<vscode.QuickPickItem[]> {
6970 ) ;
7071}
7172
72- function setPythonPath ( path : String ) {
73+ function setPythonPath ( path : string ) {
7374 // Waiting on https://github.com/Microsoft/vscode/issues/1396
74- // For now, just a stub.
75- vscode . window . showInformationMessage ( `Setting pythonPath: ${ path } ` ) ;
75+ // For now, just let the user copy this to clipboard
76+ const copy_msg = "Copy to Clipboard"
77+ vscode . window . showInformationMessage ( path , copy_msg )
78+ . then ( item => {
79+ if ( item === copy_msg ) {
80+ ncp . copy ( path )
81+ }
82+ } )
7683}
7784
7885function setInterpreter ( ) {
You can’t perform that action at this time.
0 commit comments