Mastering PyCharm

Book description

Use PyCharm with fluid efficiency to write idiomatic python code

About This Book

  • Understand how PyCharm works and how you can leverage its strength to develop applications quickly
  • Master PyCharm's editor to get a fast workflow
  • Full of examples and illustrations that focus on the practical aspects of using PyCharm

Who This Book Is For

If you know PyCharm but want to understand it better and leverage its more powerful but less obvious tool set, this is the book for you. Serving as a launch pad for those who want to master PyCharm and completely harness its best features, it would be helpful if you were familiar with some of Python's most prominent tools such as virtualenv and Python's popular docstring formats such as reStructuredText and EpyType.

What You Will Learn

  • Understand the internal workings of the IntelliJ Platform
  • Leverage PyCharm's powerful search tools, and learn which ones are the best for you and your workflow
  • Customize PyCharm's enhanced Python interpreter and its inbuilt terminal
  • Develop web applications quickly and easily with different frameworks such as Flask and Django
  • Understand how code completion works in PyCharm for Python and JavaScript

In Detail

PyCharm is addictive, with powerful and configurable code completion, superb editing tools, top-notch support, diverse plugins, and a vibrant ecosystem to boot. Learning how PyCharm works and maximising the synergy of its powerful tools will help you to rapidly develop applications.

From leveraging the power of the editor to understanding PyCharm's internals, this book will give you a comprehensive view of PyCharm and allow you to make your own choices about which workflow and tools are best for you.

You will start by getting comfortable with PyCharm and making it look exactly like you want. You can customize the tools and taskbars to suit individual developers' coding styles. You also learn how to assign keyboard shortcuts. You will master debugging by inserting breakpoints, collecting runtime data, and debugging from the console. You will understand how PyCharm works underneath and how plugins such as Codemap, Vim, Bitbucket, Assets compressor, markdown, bash file, shortcut translator, and .gitignore leverage the power of the IntelliJ platform.

You will become comfortable using the VCS interface in PyCharm and see the benefits of using it for some simple tasks as well as some more complex tasks such as partial commits using changelists.

You will take an in-depth look at the various tools in PyCharm, improving your workflow drastically. Finally, you will deploy powerful PyCharm tools for Django, Flask, GAE, and Pyramid Development, becoming well acquainted with PyCharm's toolset for web development with popular platforms.

Packed with insider tricks, this book will help you boost productivity with PyCharm.

Style and approach

An easy-to-follow guide with plenty of examples and screenshots. Each topic starts off with the goal of enhancing or changing a part of PyCharm to make it suit your needs.

Table of contents

  1. Mastering PyCharm
    1. Table of Contents
    2. Mastering PyCharm
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Getting the Right Look
      1. A short note on keyboard shortcuts
      2. The basics
        1. The first change – fonts
        2. The layout
          1. The minimalist
      3. Beautiful code
        1. Editor
          1. Getting the right colors
          2. Style hierarchies
          3. Styling on steroids
      4. Imports and exports
      5. TextMate bundles
      6. Summary
    9. 2. Understanding the Keymap
      1. Different keymaps
      2. Finding shortcuts
      3. Setting shortcuts
      4. Troubleshooting on Mac
      5. Summary
    10. 3. Getting Places
      1. Omni
        1. Back and Forward
      2. Macro
        1. Go to definition or navigate to declaration
        2. Search Everywhere
        3. The Switcher tool
        4. The Project panel
      3. Micro
        1. The Structure panel
        2. Ace Jump
      4. Summary
    11. 4. Editing
      1. Improving code completion
        1. Understanding what intentions can do for you
        2. Collecting runtime types
        3. Adding docstrings and type information
        4. The skeletons in PyCharm's closet
      2. Setting up IPython Notebook
      3. Editor plugins
      4. Writing code
        1. Refactoring
        2. Multiple cursors
        3. doc_mode
      5. Reading code
        1. The lens mode
        2. Diagrams
        3. Method hierarchies
      6. Summary
    12. 5. Interpreters and Consoles
      1. All about interpreters
        1. Adding interpreters
        2. Creating virtualenvs
        3. Through the terminal
        4. Installing packages
        5. Setting paths
        6. Remote interpreters
        7. Using Vagrant in PyCharm
      2. The PyCharm console
        1. Console configuration
      3. Summary
    13. 6. Debugging
      1. Running, debugging, and setting breakpoints
      2. Debugging workflow
      3. Dealing with threads and processes
        1. Processes
      4. Debugging from the console
      5. Attach to Process…
      6. Profiling
      7. Summary
    14. 7. The PyCharm Ecosystem
      1. The IntelliJ ecosystem
      2. Support for PyCharm
      3. YouTrack.JetBrains
      4. What makes a good plugin?
      5. Summary
    15. 8. File Templates and Snippets
      1. File templates
        1. Understanding variables
        2. Making new templates
      2. Snippets (live templates)
      3. Surround templates
      4. Summary
    16. 9. Version Control Integration
      1. Initializing version control
      2. Ignoring files
      3. Remotes
      4. The VCS menu
      5. The Changes panel
        1. Changing Diff colors
      6. Change lists
      7. Summary
    17. 10. HTML and JavaScript Tools
      1. JavaScript support
        1. Getting the most out of JavaScript code completion
          1. Using JSDoc
          2. Using libraries
        2. Transpiled to JavaScript languages
        3. Support for libraries and frameworks
          1. Client-side frameworks
          2. Server-side frameworks and NodeJS
        4. JavaScript Code Quality Tools
      2. HTML and CSS
        1. Emmet
        2. Live debugging
          1. Installing the plugin
          2. Debugging the file
        3. File watchers
      3. Summary
    18. 11. Web Development with PyCharm
      1. Database tools
        1. Adding a data source
          1. Connecting to a database
          2. Adding files
        2. Using the SQL console
          1. Parameterized statements
          2. Console history
          3. Database diagrams
        3. Exporting data
          1. Copying DDLs
          2. Exporting the table contents
      2. Web frameworks
        1. Common features
          1. Support for templating engines
          2. Customized project creation
          3. Debugging in templates
        2. Django
          1. Setting up Django
          2. Model dependency diagrams
          3. Manage.py tasks
          4. Django Console
      3. Summary
    19. Index

Product information

  • Title: Mastering PyCharm
  • Author(s): Quazi Nafiul Islam
  • Release date: October 2015
  • Publisher(s): Packt Publishing
  • ISBN: 9781783551316