Mastering Python 3 I/O
log in to bookmark this presentaton
Abstract
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.
The following major topics will be covered:
- 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 - Porting from Python 2 to 3.