editor barQuick Start Guide. Exploring the IDE
Welcome to PyCharm! This short guide aims to help you get a grip on the PyCharm IDE.
Before you start…
∙Make sure that at least one Python interpreter, version from 2.4 to 3.4 is properly installed on your computer.
∙Mind that PyCharm is available in two editions: Community and Professional. The difference between the editions is explored in Edition Comparison Matrix.
Note that the download page contains installation instructions for the various platforms; these instructions may vary for the different operating systems.
Initial setup
If this is the very first time you launch your PyCharm, it will ask you several important questions:
∙First, whether you already have setting you want to preserve (for example, from a previous version)
∙Your license information
∙And, finally, which keymap and theme you want to use:
Note that PyCharm has several pre-defined keymaps: for those who like Eclipse or Visual Studio, for the Emacs fans, GNOME, KDE and more. Explore the list of available keymaps in the Keymap page of Settings/Preferences dialog.
For the dedicated Vim users, PyCharm suggests IdeaVim plugin that helps coding in PyCharm as if in the Vim editor. For those who cannot live without real Emacs, PyCharm provides the possibility to use it as an external editor.
If later you decide that your initial choice was wrong, you can always change your settings. To learn more about configuring the IDE theme and keymap, refer to our documentation and tutorials:
See also:
Getting started with PyCharmConfiguring keyboard schemes
Setting defaults from the Welcome screen
Again, if this is your very first start (or if you have no open project), you'll see the Welcome screen. If you click the link Configure, you'll see the page of the Welcome screen that suggests you to configure your environment, plugins, import and export settings. You have to click Configure once more - and see the Settings/Preferences dialog. If you look at this dialog, you?ll notice the header "Default Project":
What does it mean? These settings will be used every time you create a new project. For example, you want all you newly created projects to use the same interpreter - OK, you can define such an interpreter in the Template Project Settings.
The IDE settings characterize your working environment (keymaps, color schemes etc.) For example, you want your editor to always show line numbers. In the Settings/Preferences dialog, go to the IDE settings, expand the node Editor, and in the Appearance page, select the check box "Show line numbers":
Next, suppose you want to use some particular color scheme for the editor, and you are not happy with the colors suggested by default. OK, select the base scheme, create its copy, and then change colors (the schemes suggested by default are not editable).
It is also possible to set your preferred font size for the editor - this is done in the Fonts pag
e of theColors and Fonts settings. Again, you have to create a copy of the scheme first, if you haven't done it already, and then specify the desired font size for the editor. This font size will apply to the current editor tabs, and all the newly opened editors. However, it does not affect the font size of the IDE components.
Note that you can always see the results of your experiments in the Preview pane:
The whole procedure is described step-by-step in the tutorial What my PyCharm looks like.
When a project is already created, you can change its settings at any moment. Configuring settings for the current project will be discussed a little bit later, in the section Customize everything for your project!.
Finally, you can show or hide actually all the UI elements: toolbar buttons, main menu, main toolbar (menu View); PyCharm also enables you to choose viewing mode. Refer to the documentation for details:
See also:
PyCharm tool windowsPresentation and Full Screen viewing modes
Project
Everything you do in PyCharm, is done within the context of a project. What is most interes
ting about PyCharm project management, is the possibility to open multiple projects in one frame. When you create a new project (File →New Project), or open an existing one (File →Open), PyCharm suggests you to choose which way you want the project to be opened: in a new window, in the same window after closing the previously opened project, or added to the previously opened project.
You can have as many projects opened in one window as required. So doing, the first project is considered the primary project. All the symbols of the added projects are visible from the primary project.
As an exercise, create a new empty project, where you can develop some pure Python code. This case is discussed in detail in the tutorial Getting started with PyCharm — in particular, the sectionCreating a simple project.
Types of projects
By the way, PyCharm suggests creating projects of the various types: Django, Flask, Pyra
mid, web2py, etc. You can explore the available types yourself, when creating a new project - just select the new project type from the drop-down list:
As you see, PyCharm supports all the major Python-based frameworks. For each of the supported project types, PyCharm creates the corresponding file and directory structure, and all the necessary artifacts. Refer to the product documentation:
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论