PyCharm

PyCharm – Understanding Basics

PyCharm – Understanding Basics

Now, as you can see, there are different options and menus available. Let us get you introduced to each component of the PyCharm window real quick.  

  • Editor: It can be used to interact with (read, write, and explore) your code.
  • Main pane or window: The entire project's information is displayed in the main pane.
  • Action Indicators and Item List: You may locate quick repairs and other operations using the icons in the left editor.
  • Status Bar: When you hover your cursor over the recent event alerts and action descriptions in the status bar, they are shown.
  • Navigation Bar: This makes it easier to navigate your project's structure and open files for editing.

  • Context Menu: This menu opens up when your editor when chooses a particular line of code and right-clicks on it. It gives you options to perform related to that line of code, for instance, copy, paste, run *module_name*, and so on. 
  • Pop-Up Menu: The pop-up menu on your tool window is a menu that pops up when you right-click on any of the elements from the Project Tool Window. It has a set of action options that can be performed using the chosen Project tool. It is like a quick list that displays a specific selection of PyCharm operations.
  • Project Tool Window: The Project tool window showcases all the tools being used in your PyCharm projects and all the PyCharm projects available at your disposal. 

  • Run Tool Window: Run to widow shows you the test and run results and lets you perform the different actions related to running the Python code.
  • Python Packages Tool Window: It tells you about the running and packages being used 
  • Gutter: It is the main pane where you write your Python code and contains your modules and classes of Python that are currently open. It lets you invoke some basic Python actions as well as some technology-specific and framework-specific features.
  • Python Interpreter Selector: It lets you select the type of interpreter you want for running your Python code. 
  • Customizing the Theme of the Editor

It will become more effective if you use IDEs to change the editor's theme separately from the environment's overall theme. This also can be done from Settings. The settings window will look somewhat like the following:

The majority of programmers enjoy changing the typeface and other elements of their code. As an illustration, Darcula is the scheme displayed below - the theme of the editor. Many editors also know this theme as the dark theme. You can change it to a High Contrast theme or IntelliJ Light theme as per your choice. This is what both the themes look like -

In addition, you may choose how lengthy a line of code in your editor should be by adjusting your line wrapping. It is advised to set the entry in this option to 79 characters because that is the maximum length a line in a Python file should be according to the most recent style manual for Python code, PEP 8. Your IDE will then display a vertical line at the 79th column, marking a place where the programmer should divide their code into numerous lines when you specify this. 

  • Creating a New Project in PyCharm

You can either use the shortcut made on your desktop or the Windows Start menu to launch your freshly installed Python IDE. As soon as you open your installed PyCharm, the following window will open up.

Step 1: Click on ‘New Project’ to create a new PyCharm project or Python code. On the other hand, ‘Open’ option is used to open a pre-existing Python executable file, and ‘Get from VCS’ is for getting the Python file from VCS, i.e. using third-party plugins.

Step 2: As soon as you click on New Project, the project will start configuring and you can set the environment for your project as you want. The window showing project details and settings would look similar to as shown in the following snap.

Once you are done configuring the project settings, click on the ‘Create’ button.

Step 3: Now, the window that will open up will look as follows:

The space given on the right-hand side of the opened panel is where you write your code and is known as Editor.  As you can see in the above snap, the window is full of options and different sections.  So, before getting started with writing your Python code in the editor, you must be well acquainted with the user interface of PyCharm.

(Note: Depending on your plugins, your settings, and the edition you choose, your PyCharm IDE may not appear exactly like the screenshot above, it may differ slightly in view or by a few options.)

Top course recommendations for you

    Angular7 for Beginners
    3 hrs
    Beginner
    21.3K+ Learners
    4.54  (865)
    Angular7 for Intermediate Level
    3 hrs
    Intermediate
    9.5K+ Learners
    4.58  (304)
    Introduction to Kubernetes
    2 hrs
    Beginner
    8.1K+ Learners
    4.3  (288)
    Angular7 for Advanced Level
    3 hrs
    Advanced
    11.1K+ Learners
    4.58  (341)
    Visual Studio Online
    1 hrs
    Beginner
    14.7K+ Learners
    4.43  (568)
    Software Testing Tutorial
    1 hrs
    Beginner
    142.7K+ Learners
    4.51  (11955)
    Programming Basics
    1 hrs
    Beginner
    191.8K+ Learners
    4.46  (12574)
    Coding Environment
    1 hrs
    Beginner
    21.4K+ Learners
    4.34  (457)