BHIS Webcast: Py2k20 – Transitioning from Python2 to Python3
In this webcast, we talk about the 2020 End of Life for Python2. We address what the short and medium term impacts will likely be. Key language differences will be highlighted with techniques to modify your code to be forward compatible.
Slides for this webcast can be found here: https://www.blackhillsinfosec.com/wp-content/uploads/2020/09/SLIDES_P2K20Python2Python3.pdf
As a SANS instructor teaching SEC573: Automating Information Security with Python, over the past three years, I have steadily moved my teaching materials, examples, demonstrations and personal code to Python3. In this process, I have had to break habits and learn new habits to write Python3 compatible scripts. I also spend considerable effort showing people how to write Python2 scripts which are forward compatible with Python3 in order to ease the transition.
The largest barrier that most people struggle with is the idea that Python3 has changed the default string encoding to UTF-8 rather than simple byte encoding. Once you learn how to manage your string objects, the remaining transition issues are mostly modern improvements to the language which most people consider advantageous to adopt.
Since Python2 will no longer have active releases after 2020, it is important to embrace the change and move forward with the Python scripting community.
This webcast was originally recorded live on 3/12/2019.
P.S. I teach Python through the SANS Institute all over the world, if you would like to see where I am teaching next, visit: https://www.sans.org/instructors/jonathan-thyer
You can learn more straight from Joff himself with his classes:
Regular Expressions, Your New Lifestyle
Enterprise Attacker Emulation and C2 Implant Development
Available live/virtual and on-demand!