使用命令模式编写、调试python程序不是很方便,推荐使用pycharm集成开发环境,PyCharm调试程序过程中支持代码跳转、智能提示、语法高亮等功能,可从官网下载, https://www.jetbrains.com/pycharm/download/,Community版本开源、免费。
双击pycharm-community.exe开始安装
选择安装路径,需要占用667MB的空间
create desktop shortcut:创建桌面快捷方式,64-bit launcher表示64位系统
Create Associations:是否关联文件,选择以后.py文件默认使用PyCharm打开,我经常用notepad++查看python文件,所以此处未勾选
Add launchers dir to the path:将启动器目录添加到路径中,需要重新启动生效,默认勾选即可
Add open folder as project:添加打开文件夹作为项目
启动pycharm,创建工程
创建python文件,命名demo1
编写代码print("This is demo1"),然后点击"运行"按钮