• VSCode用以Python开发的配置 | VSCode


    VSCode编辑器实用插件

    配置:
    {
        "workbench.startupEditor": "newUntitledFile",
        "editor.minimap.enabled": false,
        "debug.inlineValues": true,
        "files.autoSave": "afterDelay",
        "python.terminal.executeInFileDir": true,
        "editor.maxTokenizationLineLength": 100000,
        "workbench.list.openMode": "doubleClick",
        "python.formatting.provider": "none",
        "scm.autoReveal": false,
        "debug.console.fontSize": 11.7,
        "debug.internalConsoleOptions": "neverOpen",
        "terminal.integrated.fontSize": 11.7,
        "explorer.autoReveal": false,
        "[python]": {
            "editor.defaultFormatter": "ms-python.python"
        },
        "[html]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "workbench.editorAssociations": {
            "*.ipynb": "jupyter-notebook"
        },
        "notebook.cellToolbarLocation": {
            "default": "right",
            "jupyter-notebook": "left"
        },
        "workbench.iconTheme": "webstorm-icons",
        "scm.inputFontSize": 11.7,
        "markdown.preview.fontSize": 11.7,
        "explorer.confirmDelete": false,
        "editor.fontSize": 11.7,
        "editor.matchBrackets": false,
        "[json]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "terminal.integrated.cursorStyle": "line",
        "terminal.integrated.tabs.focusMode": "singleClick",
        "terminal.integrated.inheritEnv": false,
        "editor.suggestSelection": "first",
        "files.exclude": {
            "**/.classpath": true,
            "**/.project": true,
            "**/.settings": true,
            "**/.factorypath": true
        },
        "python.showStartPage": false,
        "redhat.telemetry.enabled": false,
        "[javascript]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "workbench.colorTheme": "Ultraedit Light",
        "python.languageServer": "Pylance",
        "python.analysis.completeFunctionParens": true,
        "window.zoomLevel": -1,
        "pyqt-integration.pyuic.cmd": "/opt/anaconda3/envs/qt_py36/bin/pyuic5",
        "pyqt-integration.qtdesigner.path": "/opt/anaconda3/envs/qt_py36/bin/",
        "tabnine.experimentalAutoImports": true,
        "editor.renderIndentGuides": false,
        "python.autoComplete.extraPaths": [
        ],
    }
    - 重点配置:在Scrapy或者Django项目中,单独执行某一个脚本,但需要导入项目中其他模块的对象,报错:ModuleNotFoundError
      + 需要在脚本执行前将当前workspace加入到python解释器可以读取的环境变量中
      + 措施:配置launch.json参数:
    "env": {"PYTHONPATH": "${workspaceRoot}"}
    {
        "configurations": [{
            "name": "Py: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "env": {"PYTHONPATH": "${workspaceRoot}"},
            "console": "integratedTerminal"
        }]
    }
    
    
    
    记录自己的学习历程!
  • 相关阅读:
    堆(heap)和栈(stack)的区别
    STL容器学习总结
    从瀑布模型、极限编程到敏捷开发
    智力题
    Trie树详解及其应用
    理解inode
    找出字符串中连续出现次数最多的子串
    Oracle数据库中大数据量查询优化问题分区表的操作方法
    “在解决方案中的一个或多个项目由于以下原因未能加载 项目文件或网站已移动或重新命名,或者不在您的计算机上” 的解决办法
    转:完全卸载Oracle方法
  • 原文地址:https://www.cnblogs.com/pymkl/p/12811574.html
Copyright © 2020-2023  润新知