Installation and use of development tools (second bomb)

The previous blog post talking about one python notepad ++ development tools installed, a brief talk about how to use notepad ++ to edit python code and run the code today.

Prior to this, we must remind you that, just a notepad ++ only finished editing the code (of course, it also has a simple operating functions), in order to run the code, but also to install python code interpreter. In other words, if you want to use notepad ++ to learn the python language, you need to have notepad ++ and python code interpreter these two tools; Anaconda If you choose to use will be introduced, then only need to install the Anaconda on the line, because Anaconda which has been shipped the python code interpreter.

Install the code on python interpreter, not described in detail herein, this glorious task left to other bloggers it. But to remind you, the interpreter after installation is complete, in the windows operating system, be sure to remember to add the path to the interpreter environment variable of you computer, terms used later to execute code. Another point, in fact, when you install the interpreter, python code editor also comes with installation, this editor is more streamlined than notepad ++, so little to do with this editor development tasks.

In order to test whether the interpreter's path successfully added to the environment variable, a simple way is to open the windows command line, enter "python" on the command line, press the Enter key to see whether to return the installed python interpreter the version number, as shown below:

As can be seen from the figure, python interpreter version 3.7.4 is the author. Note: The author of the python interpreter is included with the installation Anaconda, so the installation of the interpreter individual information after entering "python" is displayed somewhat different, but as long as the version number is displayed interpreter correctly, ready to work even completed, Here is the time to write the code and run the python.

Open notepad ++, enter the code

When you're finished, I save it to the desktop, named first_python, you want to pay attention to "Save as type" selected "Python file" (looking from the drop-down box)

After successfully saved, the file appears on the desktop first_python

Goes through this, edit the code phase has been completed, you can start running this python code:

Open the windows command line, enter the path to the code file is located, as the author of the code is stored on the desktop, so I first enter "cd desktop" access to the desktop path;
when we reach the code path where, enter "python first_python" (this command tells the system: using python interpreter to explain the implementation first_python file), press the Enter key

Can be seen from the figure, the command output of the "5" shows the code to be executed correctly! Because this code is very simple, so no explanation.

These are written in python code in notepad ++, and complete the process by running the code interpreter. As said before, this approach is only suitable for relatively simple coding and testing, when faced with complex tasks, we still need to function more sophisticated development tools.

End of the article, the author gives a notepad ++ interface method of adjusting the color and font:

After opening the notepad ++, find the options bar above the "Settings" and enter "formatting language" drop-down menu, then pop up the following interface

You can adjust the color and variety of font editing interface in this dialog box (including code fonts, comments, fonts, etc.) style and size. Online there are more ways to adjust notepad ++ on other settings, of you can see yourself.

Guess you like

Origin www.cnblogs.com/pythonfl/p/11915443.html