In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you what a good Python IDE is under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Introduction
I will introduce you to an integrated development environment-PyCharm, on which you can develop professional applications using the Python programming language.
Python is an excellent programming language because it is truly cross-platform, and the applications developed with it can run on Windows, Linux, and Mac systems without recompiling any code.
PyCharm is an editor and debugger developed by Jetbrains, and Jetbrains is the company that developed Resharper. I have to say that Resharper is an excellent tool that is used by Windows developers to ReFactor code, and it also makes it easier for Windows developers to write .NET code. Many of the principles of Resharper have also been added to PyCharm Pro.
How to install PyCharm
I have written a guide on how to get PyCharm, download, extract the file, and then run it.
Welcome interface
When you run PyCharm or close a project every time, a screen appears showing a series of recent projects.
You will also see the following menu options:
Create a new project
Open the project
Check out from version control warehouse
There is also a configuration setting option through which you can set the default Python version or some other settings.
Create a new project
When you select 'create a new project', it provides the following series of possible project types for you to choose from:
Pure Python
Django
Flask
Google App Engine
Pyramid
Web2Py
Angular CLI
AngularJS
Foundation
HTML5 Bolierplate
React Starter Kit
Twitter Bootstrap
Web Starter Kit
This is not a programming tutorial, so I don't need to explain what these project types are. If you want to create a simple desktop runner that can run on Windows, Linux and Mac, you can choose the Pure Python project and then use the Qt library to develop graphical applications that look native, no matter what operating system they run on.
After selecting the project type, you need to enter a project name and select a Python version for development.
Open a project
You can open a project by clicking the project name in the recently opened project list, or you can click Open, browse to the folder where you want to open the project, find the project, and select OK.
View from source control
PyCharm provides the option to view the project source code from a variety of online sources, including GitHub, CVS, Git, Mercurial, and Subversion.
PyCharm IDE (integrated development environment)
You can open the top menu in PyCharm IDE, where you can see the tabs for each open item.
On the right side of the screen is the debugging options area, where you can step through the code.
The left panel has a list of project files and external libraries.
If you want to create a new file in the project, you can right-click the name of the project and select New. You can then add one of the following file types to the project:
File
Catalogue
Python package
Python package
Jupyter notes
HTML file
Stylesheet
JavaScript
TypeScript
CoffeeScript
Gherkin
Data source
When you add a file, such as a Python file, you can edit it in the editor in the right panel.
The text is full color coded and has boldface text. The vertical line shows indentation, which ensures that the indentation is correct.
The editor has an intelligent completion function, which means that when you enter a library name or recognizable command, you can press the 'Tab' key to complete the command.
Debug program
You can debug the program anywhere using the 'debugging options' in the upper right corner of the screen.
If you are developing a graphics application, you can click the 'green button' to run the program, or you can use the 'shift+F10' shortcut key' to run the program.
To debug the application, you can click the green arrow next to the green button or press the shift+F9' shortcut. You can click on the gray edge of a line of code to set a breakpoint so that the program stops when it reaches that line of code.
You can press'F8'to run the code forward, which means you just run the code but can't get inside the function. If you want to get inside the function, you can press'F7'. If you want to return to the calling function from a function, you can press' shift+F8'.
During debugging, you will see many windows at the bottom of the screen, such as a list of processes and threads, as well as the variables you are monitoring.
When you run to a line of code, you can monitor the variables that appear in that line of code so that you can see when the value of the variable changes.
Another good option is to use the override checker to run the code. The programming world has changed a lot over the years, and it is now common for developers to do test-driven development so that they can check every change made to the program. make sure it doesn't break another part of the system.
The override checker can help you run the program and run some tests, and when the run is over, it will tell you as a percentage of the code covered by the test run.
There is also a tool that displays the name of a 'class function' or 'class', as well as the number of times a project is called and the time it takes to run in a particular code snippet.
Code refactoring
One of the powerful features of PyCharm is the code refactoring option.
When you start writing code, a small mark appears on the right edge. If the code you write may be wrong or not well written, PyCharm will be marked with a color mark.
Clicking on the color mark will tell you the problem and provide a solution.
For example, if you import a library through an import statement without using anything in the library, not only will the code turn gray, but the color tag will also tell you that the library is not in use.
For correct code, there may also be an error prompt, such as a blank line between the import statement and the beginning of the function. It also prompts you when you create a function whose name is not lowercase.
You don't have to follow all the rules of PyCharm. Most of these rules are just good coding guidelines and have nothing to do with whether your code works correctly.
There are other refactoring options on the code menu. For example, you can clean up the code and check for file or project problems.
Thank you for reading! This is the end of the article on "what is a good Python IDE under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.