support Click to see our new support page.
support For sales enquiry!

Pycharm the best IDE for Python | Odoo

Pycharm-the-best-IDE-for-Python-Odoo-e1559372600594
Author

Arunima PFeb. 14, 2019

What is IDE?

IDE stands for Integrated Development Environment. IDE provide everything needed together to develop and also test software applications. Most IDE's support many different programming languages and they also contain many more features. You may also need advanced knowledge to use them properly. As a result, it is difficult to become an expert in an any IDE. Here, let's see how pycharm works for odoo python development. Before that, typically an IDE consists of following:

  • Code editor
  • Compiler/Interpreter
  • Debugger
  • Build Automation tools

What is Pycharm?

Pycharm is an IDE for programming, specifically for the Python programming. It is developed by Czech company Jetbrains as a cross platform IDE for Python.

In addition to supporting versions 2.x and 3.x of Python , it is also compatible with Windows,Linux, and macOS. It contains all the tools which a Python programmer needs to be productive. Moreover, this includes an excellent programming text editor, syntax highlighting, code completion, project navigation, database tooling, and project options for web development. 

The Python programmers can use PyCharm as licensed software. However, JetBrains allows developers to choose from three distinct editions of the IDE — community, professional and also educational. But, the developers always choose community edition of PyCharm. The community edition still lacks some of the advanced features provided by the professional editions.

Why Pycharm for Odoo Python Development ?

If you are using Python, then you must be familiar with the fact that, there are so many options available for Python IDEs. You might feel some difficulties choosing an IDE for Python.

PyCharm is one of the most widely used IDEs for Python programming language. Pycharm for odoo python development is very useful working environment odoo.

Advantage of Pycharm for Odoo Python Development

PyCharm of course comes with a bunch of features. PyCharm is much more powerful for programming. You have integration with git, with ssh, with shell console. Code analysis is very powerful, also cross modules and also keyboard handling is much better. That is to say, it is the best ide for odoo python development.

The main advantages of Pycharm over other IDE:

Some of the features which makes it worth using are:

  • Web development framework support:
    In addition to Python, PyCharm provides first-class support for various Python web development frameworks, specific template languages, JavaScript, CoffeeScript, TypeScript, HTML/CSS, AngularJS, Node.js, and more.
  • Version control
  • Intelligent code assistant.
  • Graphical debugger and test runner.
  • It supports numerous of Python libraries
  • On-the-fly error checking and quick-fixes
  • Code folding
  • Unit Testing
  • Line Numbering
  • PEP-8 checks and recommendations improve the code quality.
  • Intuitive Project navigation
  • Smart Refactoring
  • Database Support
  • Remote Development Capabilities
  • Tons of plugins and integrated terminals.
  •  

How to use Pycharm for Odoo Python development?

1. Create a new project /Open a project

For create,

File →New Project

Then in the Location field replace untitled with your project name.

After click on the Create button on the bottom right.

For open a project,

File → Open

Then select your project

2. Create a file/directory

Right click on the project and you can create a file or directory or anything as listed.

3. Run your file/Project

For Run , just Right click in the file. Then Click on Run.

Another method is configure the Python file which you want to run.

Click on Add configuration button on the top right side of window.

Then, Configure your file. Here you can set Python interpreter as per your need.

Simply set Script path of your file and then click on Apply.

Then, you can run your file.

Here we discuss simply how to use PyCharm. In addition, there are many uses and features and have many tips and shortcuts while using PyCharm for your project.

Tips and Shortcuts

It is time to take become an expert in any IDE. There are many tips and shortcuts for any IDE. Here we discuss almost all tips and shortcuts of PyCharm.

Let’s ready to become an expert in PyCharm.

When you open your PyCharm freshly you can see basic tips you need.

  • Version Control System(VCS)
    1.Local History You can see the changes you made to your code by go to VCS →Local History→Show History

 

  • Debugging is very helpful to resolving errors in your code.
    1. Click o the left side of the line, where you want to stop your code. Then a red dots will appear.

 

2.Click on the Debugger icon in the top right in your window.

3.Code stops on the first red dots. Then you can execute line by line by click F8 and then place mouse pointer on the variable, you can see the values or it will shows in below debug tab.

4. Skip to next dot by click F9.

Keyboard Shortcuts

If you use keyboard shortcuts,then you can significantly speed up your coding.

The following lists some of the most useful shortcuts to learn.

  • View recently opened files.

    Ctrl + E

  • Recently edited files.

     Ctrl + Shift + F

  • Recent changes.

    Alt + Shift + C

  • Search in a file.

    Ctrl + F

  • Search in entire file.

    Ctrl + Shift + F

  • Replace in a file.

    Ctrl + R

  • Replace in entire file.

    Ctrl + Shift + R

  • Duplicate Line or selection.

     Ctrl +D

  • Reformat code.

    Ctrl + Alt + L

  • Show reformat file dialog.

    Ctrl + Alt + Shift + L

  • Add selection for next occurrence.

    Alt + J

  • Add selection for occurrence in current file.

     Alt + Shift + Ctrl + J

  • Add selection for last selected line or word in any file.

    Ctrl + Shift + L

  • Go to Declaration.

    Ctrl + Click

  • Find Usages.

    Alt + Shift + 7

  • View quick definition.

    Ctrl + Shift + I

  • Comment your code with line comment.

    Ctrl + /

  • Comment your code with block comment in templates.

    Ctrl + Shift + /

  • Go to Class, File, Symbols, Actions

    Ctrl + N

  • Code completion.

    Ctrl + Space

  • Go to line/column.

    Ctrl + G

  • Comparison of two files. 1.Select a file to compare with another file

2.Press     Ctrl + D

3.Select a file which you want to compare .

4. Click Ok. Then you can see the comparison between the two files in same or different project.

  • Refactor or Rename

    Shift + F6

  • List of Valid Parameters

    Ctrl + P

  • Last place where you make changes.Ctrl + Shift + Backspace
  • Join LinesCtrl + Shift + J
  • Delete LineCtrl + Y
  • Quickly move between methods in the editor.Alt + Up and Alt + Down
  • Easily make Column Selection by dragging your mouse pointer while keeping the Alt key pressed.
  • By pressing Alt + Shift + F10 you can access the Run/Debug drop down on the main tool bar ,without need to use your mouse .
    Enable horizontal scrolling with the mouse wheel by holding Shift key.

In short, hope you understood the best idea for odoo python development is Pycharm..

0