Book Image

Mastering PyCharm

By : Nafiul Islam
Book Image

Mastering PyCharm

By: Nafiul Islam

Overview of this book

Table of Contents (18 chapters)
Mastering PyCharm
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

TLDR: So you want more PyCharm productivity, but don't want to read a book. I get that! So, just head over to the main menu, go over to Help and then Productivity Guide. If you want to get down to the best tools, read Chapter 4, Editing, Chapter 5, Interpreters and Consoles, and Chapter 6, Debugging. However, if you read this book, you'll get a lot more.

Welcome to Mastering PyCharm. If you've bought this book, then you probably want to become more effective with PyCharm in your day-to-day work. However, whether you can truly master a tool as multifaceted as PyCharm is completely up for debate since PyCharm changes so fast and so quickly. However, what I can promise you is that you will learn a great deal not only about how to use PyCharm, but how PyCharm works as part of the IntelliJ ecosystem of IDEs and what that means in terms of tooling and extensibility.

What this book covers

Chapter 1, Getting the Right Look, will help you make PyCharm look the exact way you want it to. So, whether you want too many buttons or too few or you want to change the theme or modify it more effectively, PyCharm will help you do all these.

Chapter 2, Understanding the Keymap, will help you map all the actions to their shortcuts and search for the actions using the action name or by invoking the shortcut. If that doesn't make sense, it means you've been missing out on something. This chapter also covers how to overcome known problems with keyboard shortcuts.

Chapter 3, Getting Places, covers a host of tools that PyCharm has. These tools will help you navigate everything from a really large file to huge codebases with loads of packages.

Chapter 4, Editing, will explain all the tools and help you learn more about writing error-free code quickly.

Chapter 5, Interpreters and Consoles, covers a lot of interpreters that Python has. PyCharm can support a whole host of them and provide code completion inside the console and much more. If you don't read this chapter, you're really going to miss out on some of the most powerful tools PyCharm has to offer.

Chapter 6, Debugging, being an iterative chapter, covers how to incorporate PyCharm's powerful debugger in to your debugging workflow. Buckle up; this one's going to get greasy.

Chapter 7, The PyCharm Ecosystem, answers PyCharm's existential questions. Who makes it? How does it work? How do you extend it? Where do plugins come from? Oh, and a lot more.

Chapter 8, File Templates and Snippets, covers the powerful set of snippets and file templates that PyCharm has. This will help you pump out code as fast as you can hit Tab. This chapter also talks about how to make your own file templates and snippets and extend the ones that already exist, using the velocity templating language. After all, don't you hate writing the same stuff all over again, such as getters and setters or function declarations?

Chapter 9, Version Control Integration, is a short chapter on some of the good parts of PyCharm's version control features that support multiple version control systems.

Chapter 10, HTML and JavaScript Tools, covers a set of tools that PyCharm comes with, which will help you work with JavaScript efficiently. JavaScript is (unfortunately) everywhere!

Chapter 11, Web Development with PyCharm, talks about picking a web framework, any framework. Chances are that PyCharm supports it as well as the tools that support those frameworks such as SQLAlchemy and templating languages such as Jinja2 and Mako.

What you need for this book

Basic Python knowledge, such as what functions are, what docstrings are, and so on, is needed. For Chapter 9, Version Control Integration, you'll need a basic understanding of at least one version control system and for Chapter 10, HTML and JavaScript Tools and Chapter 11, Web Development with PyCharm, you'll need to know quite a bit of Python as well as how the different Python frameworks operate.

Who this book is for

This book is for those who want to learn how to use PyCharm more effectively.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "You should be then presented with a .jar file, which you can save."

A block of code is set as follows:

def add_one(n):
    return n + 1


def foo(func, n):
    return func(n)


foo(add_one, 2)

Any command-line input or output is written as follows:

pip install ipython[all]

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "What I've tried to do is put in the name of the action being done so that you can take a look in your Keymap (by navigating to File | Settings…)."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: https://www.packtpub.com/sites/default/files/downloads/1316OT_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.