PyCharm 4.0.0 Web Help

Some features described here are available in the Professional edition only.

In this section:

Prerequisites

PyCharm provides initial Cython support out-of-the-box. PyCharm recognizes *.pyx, *.pxd, and *.pxi files, and allows you to edit them.

However, if you want to compile and run *.pyx files, make sure that the following prerequisires are met:

Note

  • Cython is downloaded and installed on your computer.
  • C compiler is downloaded and installed on your computer.

Cython support

Cython files are marked with icon_cython icon.

Cython support includes:

  1. Coding assistance:
    • Error and syntax highlighting.
    • Code completion for keywords, fields of structs, and attributes of extension types.
    • Code formatting and folding.
    • Ability to create line comments (Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Alt+SemicolonCtrl+Slash, Ctrl+NumPad / or Ctrl+ColonCtrl+Slash or Ctrl+Shift+CCtrl+Slash or Ctrl+NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad /).
    • 2.5+Cython syntax for typed memoryviews.
  2. Code inspections. Almost all Python code inspections work for Cython.
  3. Refactorings.
  4. Numerous ways to navigate through the source code, among them:
    • Navigating with Structure View.
    • Navigate | Declaration (Ctrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+Alt+G, Escape, Period, Alt+Period or Ctrl+Button1 ClickF12, Shift+F2, Ctrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickF3 or Ctrl+Button1 ClickCommand B, Command Button1 Click or Button2 ClickCommand B, Command Button1 Click or Button2 ClickF3 or Control Button1 Click).
    • Navigate | Implementation (Ctrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+T or Ctrl+Alt+BAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 Click) from overridden method / subclassed class.
  5. Advanced facilities to search through the source code, in particular, finding usages.
  6. Compiling Cython modules:
    • Compilation is done using external tools. The preferred build systems (Makefile, setup.py, etc.) should be configured as external tools.
    • C compiler should be downloaded and installed on your computer.

See Also

External Links:

Web Resources: