zoukankan      html  css  js  c++  java
  • 使用Vscode写python

    在python官网下载好python2.x 或者 3.x, 然后在vscode 下载python插件. 

    写一个python程序, 运行, vscode会自动提示你配置python执行路径,并帮你创建好.vscode文件夹. 

    除了task需要配置外,其他的vscode都会自动帮你配好. 下面讲一下怎么配置task使得可以用contrl+shift+B就运行程序.

    (也可以使用shift+enter来运行部分选中的代码,但是没有整体性. 运行爬虫代码时总是有莫名其妙的错误,但是在IDLE里面却没错)

    写好python程序, 按ctrl + shift + B, 在提示界面选择最下面的other. 在自动创建的task文件里面进行配置,配置文件如下:

    {
        // See https://go.microsoft.com/fwlink/?LinkId=733558
        // for the documentation about the tasks.json format
        "version": "2.0.0",
        "tasks": [
            {
                "label": "echo",
                "type": "shell",
                "command": "C:/Python/Python37/python.exe",
                "args": [
                    "${file}"
                ],
                "group": {
                    "kind": "build",
                    "isDefault": true
                },
            }
        ]
    }
  • 相关阅读:
    系统手动激活
    scroll-into-view 简单demo
    css3 box-shadow 单边阴影
    js前端常用的方法
    css 箭头
    当前页面返回前一个页面时,执行前一个页面的方法
    小程序自定义组件
    vuejs2-生命周期
    Vuejs2-mock数据
    vuejs2+axios设置
  • 原文地址:https://www.cnblogs.com/DSYR/p/10320092.html
Copyright © 2011-2022 走看看