Difference between pages "User:Daniel sobey" and "Tutorials/Python 3: Making the Leap!"

From LCA2014 Delegate Wiki
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
 +
On Wednesday at 10:40 in the Robert Street Lecture Theatre I will be running a tutorial on porting code written for python 2 to work in python 3.
  
I'm just a linux geek from South Australia.
+
This session will be live and interactive, so to get the most out of the tutorial, please bring along a laptop and be ready to hack.
I work for Blue Crystal Solutions as a database administrator.
+
  
[https://plus.google.com/+DanielSobey Google + profle]
+
== What will be covered? ==
i'm also dns53 on freenode
+
  
 +
Getting code to run on python 3 is a *massive* topic, and we could spend an entire week looking at it and not cover everything. As we only have 100 minutes we will only cover a relatively small, but IMHO important, subset of the topic. In particular, we will look at.
  
[[File:Daniel_sobey_headshot.jpg]]
+
* How to get code which currently runs under 2.7 to run under 3.3 (without maintaining 2.7 backwards compatibility).
 +
* How to modify your 2.7 code to be as close to 3.3 compatible as possible.
 +
* How to use different tools to automate the porting process.
 +
* Common gotchas with the automated tools which may require manual intervention
 +
* Strategies for using all the different tools and techniques to make the porting process as simple as possible.
  
 +
We unfortunately won't be able to cover some interesting topics, including
  
== Gpg fingerprints ==
+
* How to get code to run under python 2 and 3 simultaneously.
'''Old key, will expire soon'''
+
* How to port python extension modules.
<pre>sec  1024D/93460D15 2008-08-02 [expires: 2014-02-28]
+
* How to use brand new features which have been introduced in python 3.
uid                  Danel Sobey (dns) <dns_server@yahoo.com>
+
uid                  Daniel Sobey <dns@dns.id.au>
+
uid                  Daniel Sobey <dns_server@yahoo.com>
+
ssb  2048g/27522DED 2008-08-02
+
ssb  4096R/8978FD55 2009-09-04
+
ssb  4096R/59459AEA 2010-12-18
+
ssb  4096R/C48B056B 2011-03-21
+
ssb  4096R/B1AAA9C9 2013-02-17
+
ssb  4096R/A0CE2052 2013-02-17</pre>
+
'''new key'''
+
<pre>sec  4096R/FA9EC035 2012-03-23 [expires: 2015-03-23]
+
uid                  Daniel Sobey (dns) <dns@dns.id.au>
+
uid                  [jpeg image of size 3522]
+
ssb  4096R/791A637E 2012-03-23</pre>
+
  
 +
The session will cater to a fairly broad range of abilities. If you're a python newbie, you should be able to keep up with everything. If you're a python guru you might just learn something new (I know I did while preparing the session!).
  
'''new key'''
+
== What to bring ==
<pre>sec  4096R/7E706939 2012-07-04 [expires: 2015-01-30]
+
uid                  Daniel Sobey (my new key 20120704) <dns@dns.id.au>
+
uid                  Daniel Sobey (My old yahoo address) <dns_server@yahoo.com>
+
uid                  [jpeg image of size 3296]
+
ssb  4096R/B26D9553 2012-07-04
+
ssb  4096g/019B5E2F 2013-12-12</pre>
+
  
'''this key is stored on android, so probably ok as long as you trust android'''
+
* A laptop with python 2 and python 3 installed.
<pre>sec  4096R/2EC08895 2013-09-21
+
* A shell and text editor.
uid                  Daniel Sobey (Android key (limited trust)) <dns@dns.id.au>
+
* Any python code which you'd like help porting form 2 to 3.
ssb  4096R/F0171431 2013-09-21</pre>
+
* The example code from github: https://github.com/timleslie/LCA_py2to3
 +
 
 +
All examples are platform agnostic and should work on linux/osx/windows.
 +
 
 +
== What to do ==
 +
 
 +
* Turn up :-)
 +
* Follow along with all the examples.
 +
* Try out the techniques on your code as we go.
 +
* Ask questions if you would like clarification...
 +
* ... but understand that the answer might be "that's beyond the scope of this session, come and chat with me later".
 +
 
 +
I look forward to seeing you all for a fun and interesting session.
 +
 
 +
@timl

Revision as of 18:12, 7 January 2014

On Wednesday at 10:40 in the Robert Street Lecture Theatre I will be running a tutorial on porting code written for python 2 to work in python 3.

This session will be live and interactive, so to get the most out of the tutorial, please bring along a laptop and be ready to hack.

What will be covered?

Getting code to run on python 3 is a *massive* topic, and we could spend an entire week looking at it and not cover everything. As we only have 100 minutes we will only cover a relatively small, but IMHO important, subset of the topic. In particular, we will look at.

  • How to get code which currently runs under 2.7 to run under 3.3 (without maintaining 2.7 backwards compatibility).
  • How to modify your 2.7 code to be as close to 3.3 compatible as possible.
  • How to use different tools to automate the porting process.
  • Common gotchas with the automated tools which may require manual intervention
  • Strategies for using all the different tools and techniques to make the porting process as simple as possible.

We unfortunately won't be able to cover some interesting topics, including

  • How to get code to run under python 2 and 3 simultaneously.
  • How to port python extension modules.
  • How to use brand new features which have been introduced in python 3.

The session will cater to a fairly broad range of abilities. If you're a python newbie, you should be able to keep up with everything. If you're a python guru you might just learn something new (I know I did while preparing the session!).

What to bring

  • A laptop with python 2 and python 3 installed.
  • A shell and text editor.
  • Any python code which you'd like help porting form 2 to 3.
  • The example code from github: https://github.com/timleslie/LCA_py2to3

All examples are platform agnostic and should work on linux/osx/windows.

What to do

  • Turn up :-)
  • Follow along with all the examples.
  • Try out the techniques on your code as we go.
  • Ask questions if you would like clarification...
  • ... but understand that the answer might be "that's beyond the scope of this session, come and chat with me later".

I look forward to seeing you all for a fun and interesting session.

@timl