Python 2.7 end-of-life - The time to upgrade is upon us

1st January 2020 marked the official end of python 2.7 development, including feature support and security fixes. Python 2.7 was over 9 years old in development years, making it the longest supported version to date. The code freeze is no in place, with the final release – 2.7.18 – scheduled for an April 2020 release. So yes there will be one more version to come down the tubes but it’s probably best that the new python project you were thinking of starting is written in 3.7 or above. ...

January 5, 2020 · 2 min · Tom

Kasa home automation with IFTTT and python webhooks

They say that the long tail page titles are best for SEO, well this one certainly should be up there with the best of them. In this post, I am going to explain how easy it is to control Kasa a HS100 / HS110 with IFTTT and python webhooks. Using this basic code, you expand into building a very powerful home automation system which fits your needs and take your Kasa home automation to the next level. ...

December 4, 2019 · 3 min · Tom

Getting started with Python 3 - a beginner's cheat sheet

Python.Org I have been getting started with python 3 – I want to make this my primary scripting language. One way I like to assist myself whilst I learn the rope is to maintain a crib sheet filled with all the trivial things I would otherwise forget. Python 3 Cheat Sheet #Define Variables programming_languages: "Python", "VB", "C++", "C#" #Print Variables print(programming_languages) print('--------------------') #Basic for loop + variables for language in programming_languages: print(language) print('--------------------') #Basic Function def FuncExample(): i: 1 for language in programming_languages: #Concatinate Strings and Integers in print statements print("Language " + str(i) + ":" + language) #Increment Integer i += 1 FuncExample() print('--------------------') #Functions with Variables #1 - Strings def FuncVarExample1(fname, lname): #Print with CRLF print("First Name: " + fname + "\r\n" + "Last Name: " + lname) FuncVarExample1("Joe","Bloggs") print('--------------------') #Functions with Variables #2 - Integers + Returning Values def FuncVarExample2(x, y): #Basic integer maths return x+y #Concatenating Strings and Integers print("33 + 42: " + str(FuncVarExample2(33,42))) print('--------------------') You can also find more code snippets here: https://exitcode0.net/code-samples/ ...

November 23, 2019 · 1 min · Tom

Debian 9 - How to upgrade python 3.5 to python 3.7

I recently spent 30 minutes figuring out how to upgrade to python 3.7 and subsequently pip version on a fresh install of Debian 9. I ran into a number of issues doing this so I though that I would put this quick post together to make this a little bit less complicated for anyone else trying to this. This post relates specifically to python version 3.7.3. Although the generic commands should also apply to earlier versions, but your milage may vary. ...

February 19, 2019 · 2 min · Tom