python 文本编辑器_为Python编程选择文本编辑器

python 文本编辑器

什么是文本编辑器? ( What is a Text Editor? )

To program Python, most any text editor will do. A text editor is a program that saves your files without formatting. Word processors such as MS-Word or OpenOffice.org Writer include formatting information when they save a file -- that is how the program knows to bold certain text and ​italicize others. Similarly, graphic HTML editors do not save emboldened text as bold text but as text with a bold attribute tag. These tags are meant for visualization, not for computation. Therefore, when the computer reads the text and tries to execute it, it gives up, crashing, as if to say, "How do you expect me to read that?" If you do not understand why it might do this, you may want to revisit how a computer reads a program.

要编写Python程序,大多数任何文本编辑器都可以。 文本编辑器是一个程序,可以格式化而保存文件。 文字处理器如MS-Word或OpenOffice.org Writer中包括格式化信息时,他们保存文件-这就是程序如何知道要大胆一定的文字和斜体等。 同样,图形HTML编辑器不会将加粗的文本另存为粗体,而是另存为带有粗体属性标签的文本。 这些标签仅用于可视化,而不用于计算。 因此,当计算机读取文本并尝试执行该文本时,它放弃了,崩溃了,好像在说:“您希望我如何阅读 ?” 如果您不明白为什么会这样做,则可能需要重新查看计算机读取程序的方式

The main point of difference between a text editor and other applications that allow you to edit text is that a text editor does not save formatting. So, it is possible to find a text editor with thousands of features, just like a word processor. The defining characteristic is that it saves the text as simple, plain text.

文本编辑器和允许您编辑文本的其他应用程序之间的主要区别是,文本编辑器不保存格式。 因此,可以找到具有数千个功能的文本编辑器,就像文字处理程序一样。 定义特征是将文本另存为简单的纯文本。

选择文本编辑器的一些标准 ( Some Criteria for Choosing a Text Editor )

For programming Python, there are literally scores of editors from which to choose. While Python comes with its own editor, IDLE, you are by no means restricted to using it. Every editor will have its plusses and minusses. When evaluating which one you would use, a few points are important to keep in mind:

对于Python编程,实际上有数十种编辑器可供选择。 尽管Python带有自己的编辑器IDLE ,但您绝不限于使用它。 每个编辑器都有其优缺点。 在评估要使用哪一个时,请牢记以下几点:

  1. The operating system you will be using. Do you work on Mac? Linux or Unix? Windows? The first criterion by which you should judge the suitability of an editor is whether it works on the platform you use. Some editors are platform-independent (they work on more than one operating system), but most are restricted to one. On Mac, the most popular text editor is BBEdit (of which TextWrangler is a free version). Every Windows installation comes with Notepad, but some excellent replacements to consider are Notepad2, Notepad++, and TextPad. On Linux/Unix, many opt for using GEdit or Kate, although others opt for JOE or another editor.

    您将使用的操作系统。 您在Mac上工作吗? Linux还是Unix? 视窗? 判断编辑器是否适用的第一个标准是它是否可以在您使用的平台上运行。 一些编辑器是独立于平台的(它们可以在多个操作系统上工作),但是大多数仅限于一个。 在Mac上,最受欢迎的文本编辑器是BBEdit ( TextWrangler是免费版本)。 每个Windows安装都附带Notepad,但要考虑的一些出色替代品是Notepad2Notepad ++TextPad 。 在Linux / Unix上,许多人选择使用GEditKate ,尽管其他人选择使用JOE或其他编辑器。

  2. Do you want a barebones editor or something with more features? Typically, the more features an editor has, the harder it is to learn. However, once you learn them, those features often pay handsome dividends. Some relatively barebones editors are mentioned above. On the feature-full side of things, two multi-platform editors tend to go head-to-head: vi and Emacs. The latter is known to have a near-vertical learning curve, but pays off abundantly once one learns it (full disclosure: I am an avid Emacs user and am, indeed, writing this article with Emacs).

    您要使用准系统编辑器还是更多功能? 通常,编辑器具有的功能越多,学习起来就越困难。 但是,一旦学习它们,这些功能通常会带来可观的收益。 上面提到了一些相对准系统的编辑器。 从功能全面的角度来看,两个多平台编辑器倾向于并驾齐驱viEmacs 。 众所周知,后者具有接近垂直的学习曲线,但是一旦学习就可以收获很多(全面披露:我是Emacs的狂热用户,实际上是与Emacs撰写本文)。

  3. Any networking capabilities? In addition to desktop features, some editors can be made to retrieve files over a network. Some, like Emacs, even offer the ability to edit remote files in real time, without FTP, over a secure login.

    有网络功能吗? 除了桌面功能外,还可以使某些编辑器通过网络检索文件。 某些工具(例如Emacs)甚至提供通过安全登录实时编辑远程文件而无需FTP的功能。

推荐的文字编辑器 ( Recommended Text Editors )

Which editor you choose depends on how much experience you have with computers, what you need it to do, and on which platform you need to do it. If you are new to text editors, I here offer some suggestions on which editor you might find most useful for the tutorials on this site:

您选择哪种编辑器取决于您对计算机的使用经验,所需的工作以及所需的平台。 如果您是文本编辑器的新手,我在这里提供一些建议,以帮助您找到对本网站上的教程最有用的编辑器:

  • Windows: TextPad offers a straightforward user experience with a few features to help you along. Some software companies use TextPad as the standard editor for programming interpreted languages.

    Windows: TextPad提供了直接的用户体验,并提供了一些功能来帮助您。 一些软件公司将TextPad用作对解释语言进行编程的标准编辑器。

  • Mac: BBEdit is the most popular editor for the Mac. It is known for offering a bevy of features but otherwise staying out of the user's way.

    Mac: BBEditMac上最受欢迎的编辑器。 它以提供一系列功能而著称,但不影响用户使用。

  • Linux/Unix: GEdit or Kate offer the most straightforward user experience and are comparable to TextPad.

    Linux / Unix: GEditKate提供最直接的用户体验,与TextPad相当。

  • Platform Independent: Naturally, the Python distribution comes with a perfectly good editor in IDLE, and it runs everywhere Python does. Other user-friendly editors of note are Dr Python and Eric 3. Naturally, one should never forget about vi and Emacs.

    独立于平台:自然地,Python发行版在IDLE中带有一个非常好的编辑器,并且可以在Python所做的任何地方运行。 其他对用户友好的注释编辑器是Python和Eric 3 博士 。自然地,永远不要忘记viEmacs

翻译自: https://www.thoughtco.com/choosing-a-text-editor-2813563

python 文本编辑器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值