Study on Python command line

Source: Internet
Author: User

What is the Python command line? The usage rules and common skills of the Python command line are found in some technical forums and Related Websites. I hope you can exchange ideas for your reference!

A basic IDE written using Tkinter in pure Python. In general, Idle is a standard Python release, or even written by Guido van rosum (at least most of the original version ). You can run Idle in any environment where Python and TK can be run. Open Idle and an enhanced interactive command line interpreter window appears (with better cut-paste and back-to-line functions than the basic interactive command prompt ).

In addition, there is an editor for Python command line (without code merging, but with syntax label highlighting and Automatic Code Completion), Class browser and debugger. The menu is separated by TK; that is, clicking the dotted line of any drop-down menu at the top will promote the menu to its own permanent window. Especially for the "Edit" menu, it is very practical to "rely on" it in the corner of the desktop.

The Idle debugger provides breakpoint, step-by-step, and variable monitoring functions, but it does not have its memory address or variable content storage, or it provides excellent synchronization and other analysis functions. Of course, my debugging style includes some scattered print commands, but your method may be different from mine.

Some minor issues in Idle-at least in version 0.6. In my Win95r2 system, the pop-up template will always stay on the screen to block what I want to enter. More seriously, it is easy to cause the Idle to stop responding when an error script is running. For example, the Code while 1: x = 1 will inevitably cause the Idle to be forcibly disabled rather than executing the code.

Obviously, no one will intentionally write this code first, but even in the oldest Python interaction session, Ctrl-C can be used to close it (it is undeniable that there is a session with this function ). PythonWin is superior to Idle in many aspects. Of course, as shown in the software name, this tool is for Win32 users. The easiest way to get PythonWin is to download the ActivePython 2.0 release.

This version is quite good (I installed build 203 for this column ). ActiveState Python includes a series of excellent additional modules, and some (such as NumPy and PIL) can be selected as additional downloads during installation. There are other additional modules;

Specifically, PythonWin (Idle is also included), and a series of useful PythonCOM extension components for Windows scripts. ActiveState has a non-Windows release, but some components do not match Windows.

PythonWin is very handy. It has an easy-to-use Editor, including code merging, syntax tag highlighting, and Automatic Code completion. Like some ides, PythonWin does not contain any form designer, but it provides an excellent debugger, it has functions such as monitoring, code check, interactive debugging window, breakpoint, and other debuggers.

The most important thing is that the Python command line is very stable, although sometimes it is strange to "stop responding" when used on the Win95r2 system ". On the interface, PythonWin is relatively simple, but very attractive. It makes good use of embedded and docked elements.

PythonWin also integrates Python instructions for HtmlHelp of ActiveState and PythonCOM. MacPython IDE is similar to PythonWin, but for different platforms. Similar to Idle and PythonWin, MacPython IDE appears with the standard release for its platform and is a free software (written by Just van rosum ).

After installing MacPython, we recommend that you first try to obtain the Advanced Editor Patch. The first installation was a bit strange, but it was successful for the third time. After installing this patch, you can obtain syntax label highlighting and some context-sensitive functions or module help functions.

Except for the standard version, I don't know if there are other ides that can work with Python command lines on Mac platforms. Fortunately, the tool compiled by Just van rosum is very similar to Python and has a software style similar to Mac.

MacPython IDE contains Python command line windows (Mac itself does not have a command line, so multiple steps are required), editors, debuggers, and even descriptors. In its environment, there is a function jump list, a module browser, and some other tools. The debugger is excellent, but there is no monitor. The editor "not included in the standard release" is relatively original, but the patch is highlighted with syntax labels.

However, there is still no code merging or code automation (but there is a context function documentation line after the patch is installed ). The built-in descriptors are functions not available in most ides, which is also the advantage of MacPython. In my opinion, Komodo is more like a superset of PythonWin. As far as I know, it does not share most of the same Code libraries, but it feels similar.

Thanks to Mozilla's features, Komodo is the best interface in the software I evaluated, because it is also the slowest to run for the same reason. I do not recommend using Komodo on older machines. I tested it on the 366 Mhz Win95r2 system and found it can run but it is not fast.

Although the debugger and Editor interface is similar to PythonWin, You can edit many other languages, debug Perl and Python, and run Komodo in Linux. Komodo's "code check" function is extremely intelligent and unique. It operates like the spelling checker of many recent word processing software.

When you enter the data, the following code indicates a curve. You can continue to enter the data, which is always marked until you return the data and correct the problem. This is also a good reminder. Komodo didn't try to build any Form Designer or graphic programming in place. In addition, it is good as a beta version.

  1. Introduction to Python system files
  2. How to correctly use Python Functions
  3. Detailed introduction and analysis of Python build tools
  4. Advantages of Python in PythonAndroid
  5. How to Use the Python module to parse the configuration file?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.