Contribute Media
A thank you to everyone who makes this possible: Read More

Mastering Python 3 I/O (part 1)

Description

Mastering Python 3 I/O

Presented by David Beazley

As most Python programmers know, Python 3 breaks backwards compatibility with Python 2 in a number of significant ways. Although guides to Python 3 tend to focus on superficial incompatibilities such as the new print function, changes to exception handling, or new language features, the most substantial changes concern the strict separation of Unicode and bytes as well as the new I/O stack. Not only do these changes have far-reaching effects throughout the standard library, but changes to I/O are likely to be the most major source of problems for anyone porting an existing Python application to Python 3. In this tutorial, we're going to take a top-to-bottom tour of the entire Python 3 I/O system. We'll focus on how to properly handle both text and binary data, changes to standard library modules, examine advanced features such as the buffer API, perform some performance experiments, and end with practical advice for programmers working on porting applications from Python 2 to 3. Intended Audience

Intermediate to advanced Python programmers who are either developing new applications or contemplating a migration to Python 3. Attendees should already be familiar with the basics of Python programming including standard datatypes and commonly used library modules. A background in systems programming topics such as file handling, subprocesses, and socket programming is also recommended. Class Outline

  • Introducing Python 3 (with a focus on I/O)
  • Text Processing
  • Binary Data Handling
  • Dealing with System Interfaces and External Programs
  • The New io library
  • Network programming
  • The revised buffer API and direct I/O
  • Porting from Python 2 to 3.

Details

Improve this page