Pycharm 简明教程

Pycharm - Introduction

PyCharm 是用于 Python 脚本语言最流行的 IDE。本章将向您介绍 PyCharm 并说明其功能。

PyCharm is the most popular IDE used for Python scripting language. This chapter will give you an introduction to PyCharm and explains its features.

PyCharm 向其用户和开发人员提供一些最佳功能,如下所示 −

PyCharm offers some of the best features to its users and developers in the following aspects −

  1. Code completion and inspection

  2. Advanced debugging

  3. Support for web programming and frameworks such as Django and Flask

Features of PyCharm

此外,由于具备以下功能,开发人员使用 PyCharm 会感到很舒适 −

Besides, a developer will find PyCharm comfortable to work with because of the features mentioned below −

Code Completion

PyCharm 让更流畅地完成代码,无论是内置代码还是用于外部包的代码。

PyCharm enables smoother code completion whether it is for built in or for an external package.

SQLAlchemy as Debugger

你可以设置一个断点,在调试器中暂停,并且可以查看 SQL 语言代码用户表达式的 SQL 表达。

You can set a breakpoint, pause in the debugger and can see the SQL representation of the user expression for SQL Language code.

Git Visualization in Editor

编写 Python 代码时,对于开发人员来说,查询是正常的。PyCharm 中可以轻松地查看最后一次提交,因为它有蓝色的部分,可以定义最后一次提交和当前提交之间的差异。

When coding in Python, queries are normal for a developer. You can check the last commit easily in PyCharm as it has the blue sections that can define the difference between the last commit and the current one.

Code Coverage in Editor

你可以在 PyCharm 编辑器外部运行 .py 文件,也可以在项目树中的其他地方,在摘要部分等标记它作为代码覆盖率详细信息。

You can run .py files outside PyCharm Editor as well marking it as code coverage details elsewhere in the project tree, in the summary section etc.

Package Management

所有已安装的包都以适当的可视化效果显示。其中包括已安装包的列表,以及搜索和添加新包的功能。

All the installed packages are displayed with proper visual representation. This includes list of installed packages and the ability to search and add new packages.

Local History

本地历史总是在以类似于 Git 的方式跟踪更改。PyCharm 中的本地历史提供了回滚和添加所需内容的完整详细信息。

Local History is always keeping track of the changes in a way that complements like Git. Local history in PyCharm gives complete details of what is needed to rollback and what is to be added.

Refactoring

重构是同时重命名一个或多个文件的过程,PyCharm 包含各种快捷方式,以实现平滑的重构过程。

Refactoring is the process of renaming one or more files at a time and PyCharm includes various shortcuts for a smooth refactoring process.

User Interface of PyCharm Editor

PyCharm 编辑器的用户界面显示在下面给出的截图中。请注意,编辑器包含各种特性,用于创建新项目或从现有项目导入。

The user interface of PyCharm editor is shown in the screenshot given below. Observe that the editor includes various features to create a new project or import from an existing project.

pyCharm editor

从上面显示的截图中,你可以看到新创建的项目 Demo,以及用于包管理的 site-packages 文件夹,以及其他各种文件夹。

From the screenshot shown above, you can see the newly created project Demo and the site-packages folder for package management along with various other folders.

你可以下载 PyCharm 编辑器,并在以下链接中阅读其官方文档 − https://www.jetbrains.com/pycharm/

You can download the PyCharm Editor and read its official documentation at this link − https://www.jetbrains.com/pycharm/