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
Daniel Arbuckle???s Mastering Python
Daniel Arbuckle???s Mastering Python

Daniel Arbuckle???s Mastering Python: Build powerful Python applications

Arrow left icon
Profile Icon Daniel Arbuckle
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Jun 2017 274 pages 1st Edition
eBook
€8.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Daniel Arbuckle
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Paperback Jun 2017 274 pages 1st Edition
eBook
€8.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Daniel Arbuckle???s Mastering Python

Setting Up

In the previous chapter, we took a brief tour of the Python programming language. In this chapter, we will look at various ways to download and install the correct version of Python, then we will see how to run Python code. In the last couple of sections of this chapter, we'll see how to begin taking advantage of the wide variety of publicly available Python code that can be found on the internet.

The topics covered in this chapter are as follows:

  • Downloading and installing Python
  • Using the command line and the interactive shell
  • Installing packages with pip
  • Finding packages in the Python package index

Downloading and installing Python

The topic of this section is downloading and installing the Python runtime and standard library. For this, let's first take a look at the download page, https://www.python.org/, which is, of course, the authoritative place to find Python. You will learn a little bit about which versions of Python exist and the one we should choose for this book. Then, we'll move on to how to set up Python for this book. Finally, we'll check that everything worked the way we wanted.

Before we can really begin working with Python, we need to make sure we've got the language interpreter and libraries properly installed. The first step for that is to decide which version of the language to install.

Choosing a suitable version

...

Using the command line and the interactive shell

Since, we looked at installing Python, let's try our hand at making Python actually do things using the textual interface.

Text-based user interfaces are very useful to programmers; they provide a quick and easy way to interact with programs while they're in development, experiment with code (which is, after all, text), and access documentation.

Opening a command-line window

How you open a command-line window depends on the operating system you're using.

  • On Windows 7, open the Start menu and type CMD into the Run box.
  • In Windows 8, press the Windows key and then type CMD and select Command Prompt.
  • On Windows 10, press the Windows key and select Command Prompt...

Installing packages with pip

In this section, we'll take a look at using Python's package manager to install and manage third-party code, and now, it's back to the operating system command line for us. We'll see how to easily install third-party code from the Python Package Index.

While Python comes with batteries included, that is, the Python standard library that's already installed contains a wide range of very useful features, there's still plenty of things it doesn't do. Odds are though that somebody somewhere has already invented the wheel for us and if so, we can probably find it in the Python Package Index.

The pip tool for packages

Python, from version 3.4 onwards, is installed with...

Finding packages in the Python Package Index

Earlier, we talked about installing packages from the Python Package Index, but what if we don't have a specific package we need to install? What if we just need a library to help us get the job done, but don't know which specific one we need? Well, as the name of the section implies, the Python Package Index is actually an index of packages, which classifies the packages according to a number of parameters. The index is conveniently hosted at https://pypi.python.org/pypi. We could search the available packages in a number of ways. Let's discuss it in detail.

Using keywords

Perhaps, the most useful way of accessing the index is to simply type keywords into the search...

Summary

In this chapter, we learned how to install Python and get to a place where we can begin working on real code. We looked at running Python in a command-line window and using it to perform experiments and calculations. We examined how to make the best of Python's command line and its extensive help library.

We learned about installing, uninstalling, and upgrading the packages using pip. We also got a pretty good idea of how to find third-party code to help us move our projects along, using the Python Package Index.

In the next chapter, we'll work through the steps to create and work with our own Python code packages.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Covers the latest and advanced concepts of Python such as parallel processing with Python 3.6
  • • Explore the Python language from its basic installation and setup to concepts such as reactive programming and microservices
  • • Get introduced to the mechanism for rewriting code in a compiled language along with ctypes and Cython tools

Description

Daniel Arbuckle's Mastering Python covers the basics of operating in a Python development environment, before moving on to more advanced topics. Daniel presents you with real-world solutions to Python 3.6 and advanced-level concepts, such as reactive programming, microservices, ctypes, and Cython tools. You don't need to be familiar with the Python language to use this book, as Daniel starts with a Python primer. Throughout, Daniel highlights the major aspects of managing your Python development environment, shows you how to handle parallel computation, and helps you to master asynchronous I/O with Python 3.6 to improve performance. Finally, Daniel will teach you the secrets of metaprogramming and unit testing in Python, helping you acquire the perfect skillset to be a Python expert. Daniel will get you up to speed on everything from basic programming practices to high-end tools and techniques, things that will help set you apart as a successful Python programmer.

Who is this book for?

If you are a programmer and are familiar with the basics of Python, and you want to broaden your knowledge base to develop projects better and faster, this book is for you. Even if you are not familiar with Python, Daniel Arbuckle's Mastering Python starts with the basics and takes you on a journey to become an expert in the technology.

What you will learn

  • Get to grips with the basics of operating in a Python development environment
  • Build Python packages to efficiently create reusable code
  • Become proficient at creating tools and utility programs in Python
  • Use the Git version control system to protect your development environment from unwanted changes
  • Harness the power of Python to automate other software
  • Distribute computational tasks across multiple processors
  • Handle high I/O loads with asynchronous I/O to get a smoother performance
  • Take advantage of Python s metaprogramming and programmable syntax features
  • Get acquainted with the concepts behind reactive programming and RxPy

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2017
Length: 274 pages
Edition : 1st
Language : English
ISBN-13 : 9781787283695
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jun 30, 2017
Length: 274 pages
Edition : 1st
Language : English
ISBN-13 : 9781787283695
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 111.97
Daniel Arbuckle???s Mastering Python
€32.99
Python Data Structures and Algorithms
€36.99
Python GUI Programming Cookbook, Second Edition
€41.99
Total 111.97 Stars icon
Banner background image

Table of Contents

12 Chapters
Python Primer Chevron down icon Chevron up icon
Setting Up Chevron down icon Chevron up icon
Making a Package Chevron down icon Chevron up icon
Basic Best Practices Chevron down icon Chevron up icon
Making a Command-Line Utility Chevron down icon Chevron up icon
Parallel Processing Chevron down icon Chevron up icon
Coroutines and Asynchronous I/O Chevron down icon Chevron up icon
Metaprogramming Chevron down icon Chevron up icon
Unit Testing Chevron down icon Chevron up icon
Reactive Programming Chevron down icon Chevron up icon
Microservices Chevron down icon Chevron up icon
Extension Modules and Compiled Code Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Jane F. Ruthford May 31, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I liked the examples and clear explanations in Daniel Arbuckle's book. It felt like he was teaching and listening to me puzzle over definitions and concepts as I work to "master Python." I'm not completely through the book yet, but so far, my engagement with the topics in the book has remained high. I definitely recommend this articulate book.
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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.