Home  >  Article  >  Backend Development  >  什么样的 Python 编辑器比较适合新手?

什么样的 Python 编辑器比较适合新手?

WBOY
WBOYOriginal
2016-06-06 16:22:281489browse

回复内容:

PyCharm 别无所求

JetBrains出品的商业Python IDE
Java界知名的Intellij IDEA就是出自这家家公司

优点:
  1. 支持重构
  2. 支持Django
  3. 支持可视化调试
  4. 支持GAE
  5. 支持智能提示
  6. 集成单元测试
  7. 集成SVN,Git和Hg等各种版本管理工具
  8. 可以利用Intellij IDEA的各种插件
  9. 支持Windows, Mac和Linux平台

缺点:
价格:100$ (可以免费试用一个月)
开始用的时候考虑买一套,后来发现其实每个月重装一次也可以的。

jetbrains.com/pycharm/

PS: 它是我放弃用VIM做Python开发的唯一理由。 PyCharm,真的用过之后会爱上的。自动补全,代码格式化,智能提示等,太多功能了,现在还没摸索清楚。而且,对django的支持也很好,代码补全的功能很强大,自定义模块中的方法都可以补全 PTVS - Python Tools for Visual Studio
youtu.be/JNNAOypc6Ek
什么样的 Python 编辑器比较适合新手? PTVS 2.0- A quick overview (2-4 mins per feature) http://v.youku.com/v_show/id_XNjI4Mjc5Mjgw.html?from=s1.8-1-1.2
什么样的 Python 编辑器比较适合新手?

PTVS is a free, open source plugin that turns Visual Studio into a Python IDE.

PTVS supports CPython, IronPython, editing, browsing, Intellisense, mixed Python/C++ debugging, remote linux/MacOS debugging, profiling, IPython, Django, and cloud computing with client libraries for Windows, Linux and MacOS.

Designed, developed, and supported by Microsoft and the community.

当然ipython系列啦。ipython notebook 也很棒。支持markdown mathjax。嵌入代码。还可以导出PDF格式哟。下个anancoda就行。一键下载一键安装。win。mac。Linux。平台都行。重点是免费。

如果另外的推荐我还是推荐pycharm吧。jetbrain系统出品。品质有保证。(话说jetbrain大有统治世界的既视感啊!)

好了就说这么多。啦啦 ulipad .. 之前回答的问题被跳转到这个页面啦,就复制下之前的答案吧。

Python新手,Sublime Text 2新手,MacVim新手,Visual Stdio新手。

但是我真的觉得Sublime Text超级无敌好用啊!真的超级无敌漂亮啊!真的可以完美跨平台啊!
当然Vim也挺好看的,但是真的好难配啊。。。

好啦,上干货啦!
先看图!
好吧,13寸MacBook Pro好像开两个编辑窗口会有点短。。
什么样的 Python 编辑器比较适合新手?配置这样一个环境只需要5分钟!真的只需要5分钟哦!

说下步骤吧:
1. Python运行环境的设定:
Mac OS下面Sublime Text只需要在选定Build System下设定为Python就可以完成运行环境的设定啦。
Windows下需要设定python路径。参考
什么样的 Python 编辑器比较适合新手?
点击“Preference”-----》“Browse Packages”----------》“python”,编辑Python.sublime-build文件,添加python应用程序的路径,我的是安装到了c:\Python27路径中:
{
"cmd":["python.exe", "-u", "$file"],
"path":"C:/Python27",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}

注意:1、代码路径和环境变量的路径中不要带中文,对中文支持还不好。

2、写完程序后,需要先保存一下,才能够运行。运行时按ctrl+b。


2. 更改主题:
首先安装package contral:按ctrl +`,输入:
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('Package Control'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
然后按Ctrl+Shift+P(Win) 或 Command+Shift+P(Mac) 调出控制面板,就可以下载主题啦。
输入install,回车啊,
输入theme,就有各种各样的主题啦~
什么样的 Python 编辑器比较适合新手?
下载下来,然后更改Settings - User下的设定就好~
这是我的Settings - User:
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"font_size": 14.0,
"theme": "Flatland Dark.sublime-theme"
}
参考下:Sublime Text 2 主题推荐:Flatland

重点:当然Sublime Text 2 对中文支持有问题,需要使用中文,包括注释,请在.py内开头输入:
#coding=utf-8
然后按ctrl + b 就可以运行啦~ 我觉得windows Python安装包的IDLE就很适合,更深入点可以用Vim sublime text啊
本身就是python写的 按照“决不花钱”的强盗逻辑,要收费的就不推荐了...
免费的IDE,坚决eclipse + pyDev不二~
komodo免费版也行,比eclipse+pyDev稍逊,没有outline、重构功能;
每次看到讨论IDE的时候就有人推荐vim/emacs,我劝你们还是打住吧——vim/emacs很强大是没错,但前提是你要熟悉它,不熟悉的话你至少要挣扎好几个星期...都花在折腾编辑器上..而且,目前看来,vim/emacs最终挣扎出来的结果不见得比eclipse+pyDev好——我还真没见过谁把vim折腾到像pyDev那样auto-completion + outline + refactoring + debug一应俱全的,拜托我们没那么多时间我们只是想快速用python脚本写点东西...

sublime text 2/3 适用于目前任何主流语言,Linux、Windows、mac全平台
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn