Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
MASTERING PYCHARM
MASTERING PYCHARM

MASTERING PYCHARM: Use PyCharm with fluid efficiency to write idiomatic python code

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

MASTERING PYCHARM

Chapter 2. Understanding the Keymap

The keymap is one of the most powerful features that PyCharm has to offer. It allows you to set your keyboard shortcuts and find the keyboard shortcuts you've seen other people use. It also allows you to use a familiar set of keyboard shortcuts that you're used to such as Eclipse and Emacs. This chapter is very much a standalone chapter, and if you understand how keymaps work, you're well on your way to using the most powerful features that PyCharm has to offer with ease.

In this chapter, we are going to go over the following topics:

  • Different keymaps: PyCharm assumes that you might have had prior experience with a separate IDE or editor, so you can quickly adapt PyCharm to predetermined keyboard shortcuts.
  • Finding shortcuts: A lot of times, you will see other people using keyboard shortcuts, but you won't know what they're called. This section will remedy that.
  • Setting shortcuts: We will customize our own keyboard and mouse...

Different keymaps

PyCharm has a default keymap and even a nice PDF to show you all the most used commands when you navigate to Help | Default Keymap Reference (the same on Mac, Windows, and Linux).

Different keymaps

On Mac, the default keymap is OSX 10.5+, and on both Windows and Linux, the default keymap is called Default. This can easily be changed by changing the keymap by going to Preferences (Mac) or Settings… (Windows/Linux).

Different keymaps

Notice how my keymap is Mac OS X 10.5+ copy. This is because you cannot override a predefined configuration; you can only make your own copy of it. If my list is different from yours, it's because I imported some of my keymaps; in this case, Default copy from my Windows installation. Just like themes, you can import and export keymaps.

Finding shortcuts

Now you can easily search for the keyboard shortcut that you're looking for in the find bar, for example, if we want Find Action…, we can search for it like this:

Finding shortcuts

However, you can also do just the reverse by inputting the shortcut to find out what it's called (this is incredibly useful when you're trying to explain what you're doing to someone else on another platform with a different set of default keyboard shortcuts).

Finding shortcuts

So, if we wanted to find what Alt + Q does, we would have done this:

Finding shortcuts

At this point, I feel that it would be prudent to note that Mac shortcuts have special symbols in them, while Windows/Linux don't (you can skip the next page). When I was first using Mac with PyCharm, I found this quite perplexing because other than the command key (), there were no other symbols on my Mac's keyboard. These characters are explained in the bottom-right corner of the Default Keymap Reference for Mac (which is a PDF).

However, if you...

Setting shortcuts

Now that we've got all the basics down, it's (finally) time to make a keyboard shortcut of our own, and we are going to start by making a keyboard shortcut for the terminal. I have my terminal set to open up at [command + Shift + ;]. So, let's see how we can get around to doing that.

First, we are going to look up for terminal and see what we get:

Setting shortcuts

If you take a look, you will see that we have three options, and it turns out that they all do the same thing. Now, notice how Terminal pops up in three separate places. This is because the terminal inside PyCharm is in fact two things: one being a bundled plugin and another being a tool. This is why you see Terminal appearing in several places. This Terminal tool can be invoked by both [command + Shift + ;] and [Alt + F12]. Now, I don't really like [Alt + F12], so I am going to get rid of it, by right-clicking (or double-clicking) on the highlighted row:

Setting shortcuts

Now I am assigning a new shortcut by clicking on Add Keyboard...

Troubleshooting on Mac

One problem I faced when I first set up my Mac was that the keyboard shortcuts did not work; instead of getting the desired action, I got weird Greek letters appearing here and there. At first, I thought this was PyCharm's fault, but it wasn't.

The main problem was that the keyboard layout I was using, U.S., had special characters appearing when the Alt/Option key was pressed. In order to actually use my keyboard shortcuts, I had to change my layout to something that did not have these special characters appearing. Here is the solution to this problem.

  1. Download the key mapping file from Packt's website.
  2. After you've downloaded it, move it to ~/Library/Keyboard Layouts.
  3. Once you've saved the file there, all you need to do is make it your main keyboard layout. To do this, you need to head over to System Preferences:
    1. Go to Keyboard:
      Troubleshooting on Mac
    2. And then, choose to add a new one by clicking on the + button:
      Troubleshooting on Mac
    3. Choose Others, as shown in the following screenshot:
      Troubleshooting on Mac
    4. Once...

Summary

In this chapter, we covered what is perhaps the most important part of using any IDE. We also looked at the common problems that one might have with setting up keyboard shortcuts on Mac.

The contents of this chapter will serve us well in the future as it will allow us to talk about keyboard shortcuts by reference to what they are called instead of having to provide a long list of possible shortcuts depending on our mapping.

Left arrow icon Right arrow icon

Description

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.

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
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 23, 2015
Length: 232 pages
Edition : 1st
Language : English
ISBN-13 : 9781783551316
Vendor :
JetBrains
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Oct 23, 2015
Length: 232 pages
Edition : 1st
Language : English
ISBN-13 : 9781783551316
Vendor :
JetBrains
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 103.97
Python GUI Programming Cookbook
€36.99
MASTERING PYCHARM
€29.99
Mastering Flask
€36.99
Total 103.97 Stars icon
Banner background image

Table of Contents

12 Chapters
1. Getting the Right Look Chevron down icon Chevron up icon
2. Understanding the Keymap Chevron down icon Chevron up icon
3. Getting Places Chevron down icon Chevron up icon
4. Editing Chevron down icon Chevron up icon
5. Interpreters and Consoles Chevron down icon Chevron up icon
6. Debugging Chevron down icon Chevron up icon
7. The PyCharm Ecosystem Chevron down icon Chevron up icon
8. File Templates and Snippets Chevron down icon Chevron up icon
9. Version Control Integration Chevron down icon Chevron up icon
10. HTML and JavaScript Tools Chevron down icon Chevron up icon
11. Web Development with PyCharm Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.6
(17 Ratings)
5 star 23.5%
4 star 5.9%
3 star 5.9%
2 star 41.2%
1 star 23.5%
Filter icon Filter
Top Reviews

Filter reviews by




CBO Dec 15, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a developer I found this book to be very helpful. I have been a long time PyCharm user, but most of my day is spent tracking down feature requests and fixing bugs. Not so much learning how to be more productive using an IDE. However I found this book a great tutorial for speeding up common tasks like refactoring, debugging and live templates for code snippets. I didn't even know about some of these more advanced features that are hidden behind the most common tasks that you use everyday. Debugging options for attaching to running processes was also a very interesting topic.
Amazon Verified review Amazon
Gixxer Boy Dec 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
After using Pycharm for a number of years, I decided to buy this book to try and make better use of it. It covers a number of topics, some I don't really use, such as web development. Others, such as remote debugging, using virtualenv and Vagrant integration , integrated ipython console have become part of my standard toolset.While I could have trawled the web for all of this information, this book provided a structured way to improve the quality and consistently of the code I write, as well as spending more time on the interesting tasks.Well worth the money.
Amazon Verified review Amazon
Dr. John Nov 11, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Super book thank you
Amazon Verified review Amazon
parafly73 Nov 27, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm not a developer but I use Python to make my life easier in many aspects of my daily job since a few years. Very early on I decided to use PyCharm as my IDE of choice. I always wondered that some tasks were rather cumbersome and I was pretty sure that PyCharm offered better ways to accomplish certain things. I got by and never thought it was worth the time to work through my (minor) problems.However, this book comes straight to the point, and shows how to get the most out of PyCharm. It may be not be of great value for somebody that worked with PyCharm day in day out for a long time. For me it made my job quite a bit easier as I'm not using the software more efficiently. All the little issues of which I always suspected must have a simple solution, got addressed.
Amazon Verified review Amazon
just ask me Oct 29, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Hope this helps...
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela