Win 平台做 Python 开发的最佳组合
在 Windows 上怎样做 Python 开发?是像大神那样使用纯文本编辑器,还是用更加完善的 IDE?到底是用自带的命令行工具,还是需要装新的 Terminal?本文将带你了解如何利用微软官方维护的 MS Terminal 与 VS Code,来为 Python 开发保驾护航。

什么是微软 Terminal
微软 Terminal 效果怎么样
安装 Visual Studio Code
发现并安装 Python 扩展
编写简单的 Python 应用程序
了解如何在 VS Code 中运行和调试现有 Python 程序
将 VS Code 连接到 Git 和 GitHub,与全世界分享你的代码


MS Terminal 开源地址:https://github.com/microsoft/terminal




既支持 Python 3.4 及更高版本,也支持 Python 2.7 版本
使用 IntelliSense 完成代码补全
Linting
调试支持
代码片段支持
单元测试支持
自动使用 conda 和虚拟环境
在 Jupyter 环境和 Jupyter 笔记本中进行代码编辑

Keymaps 允许已经熟悉 Atom,Sublime Text,Emacs,Vim,PyCharm 或其他环境的用户更加容易上手。
主题自定义 UI,无论您喜欢在明亮,黑暗或更丰富多彩的地方进行编码。
语言包提供本地化体验。
GitLens 直接在编辑视窗中提供了大量有用的 Git 功能,包括非责任注释和存储库开发功能。
通过从菜单中选择 File, Auto Save,可以轻松进行自动保存。默认延迟时间为 1000 毫秒,也可以重新配置。
Settings Sync 允许用户借助 GitHub 在不同的装置中同步自己的 VS Code 设置。如果用户在不同的计算机上工作,这有助于运行环境保持一致。
Docker 让用户可以快速轻松地使用 Docker,帮助创作 Dockerfile 和 docker-compose.yml,打包和部署项目,甚至为项目生成适当的 Docker 文件。




创建一个文件夹来保存项目(可能包含一个新的 GitHub 项目)
更改为新文件夹
使用命令 code filename.py 创建初始 Python 代码
cd /path/to/project code .


自动变量跟踪
监看表达式
断点
调用堆栈检查



将文件提交给 Git
将更改推送到远程存储库(remote repo)并从中取出更改
check-out 现有或创建新的分支和标签(branch and tag)
查看并解决合并冲突(merge conflict)
查看差异(view diffs)


文章转载:机器之心
(版权归原作者所有,侵删)

点击下方“阅读原文”查看更多