We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

It Works on My Machine: Writing Python Code for Any Environment

Formal Metadata

Title
It Works on My Machine: Writing Python Code for Any Environment
Title of Series
Part Number
24
Number of Parts
173
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language
Production PlaceBilbao, Euskadi, Spain

Content Metadata

Subject Area
Genre
Abstract
Kyle Knapp - It Works on My Machine: Writing Python Code for Any Environment Have you ever developed a nice, well-working python program on one environment, only to have it blow up with exceptions and tracebacks when you run it on a different environment? Have no fear! This talk will show you how to write and maintain python code that is compatible across environments that may differ by python versions and/or operating systems. Techniques and tips will be drawn from lessons and experiences gained from making the AWS CLI, a python-based command line tool to manage AWS resources, compatible across a wide range of environments. In a case-study-like format, real-life compatibility issues encountered while developing the AWS CLI will be presented along with how we resolved each of them. These real-life examples will encompass, but will not be limited to, the following topics: • How to use functions and classes that may differ across python versions and/or operating systems • How to handle version-specific bugs • How to handle strings, bytes, and Unicode across python versions • How to handle differing locale settings • How to handle file operations across operating systems • How and when to vendor dependencies • How to write tests that are compatible across python versions and operating systems • How to create a testing environment that monitors compatibility of code across various environments Ultimately, the goal of these examples is introduce to you some effective, real-world programming practices to overcome your current or next compatibility issue.
Keywords