Free "Python for Beginners" video series

For those migrating (or contemplating migrating) to the new rules engine… Microsoft has released a free 44 part Python for Beginners video series.


With the caveat that Jython is based on Python 2 which officially falls out of support in January 2020.

1 Like

For all practical purposes, there is almost no difference between Jython 2.7 and Python 3 for Rules development. Once either the Jython developers create a usable 3.x version of Jython, or OH moves to a version of the JRE that supports Graal VM we can migrate to 3.x and the changes required to any Rules you’ve developed prior will be minimal to none.

Thank you, Mark! I had actually added this to the helper library docs when MS released them, but I’ve not pushed yet. BTW… I’ve moved this topic to another category, as Development is intended for OH development and not scripting. And you’re link seems to have run off…

Bruce, what was the intent behind your comment? No matter how I read it, all I see is an attempt to dissuade people from using Jython and the new rule engine due to lack of support. While Python 2 development and support will end, Jython 2.7.2 development is still active. There was some work done on Jython 3.5, but it is very unlikely to continue and I would expect to see GraalVM integrated within the new rule engine before you’ll see a Jython 3.5 release.

I have not yet used Jython but plan to soon. The print command, for example, works differently in Python 2 vs Python 3. Python 3 requires parentheses.
I have recently had to teach myself Python and why many online example scripts do not work in Python 3. I agree that Jython is currently the best version for OH scripting but I assumed the videos would cover Python 3 which could have some differences.

Thanks. That’s a better place for it!

1 Like

IIRC, the videos were not tailored to a specific Python version. The instructors also let you know when they were doing something that was not compatible in all versions of Python.

1 Like

Fair enough. I have not had time to look at them.

And you wouldn’t be using the print command in OH Rules. You would be using the logger to write out to the log.

There are many differences like that that will catch you up. But I’ve yet to encounter one that would actually impact what you would do when writing OH Rules. It’s really very low risk to give Jython Rules a chance right now, even if the Python foundation is about to end development on Python 2.

Scott also makes a good point. While the Python foundation will end development on the Python 2 standard and their reference implementations, they are not the only organization that provides an implementation of Python 2 and those organizations may continue development.

1 Like

True, but generally CPython has defined the standard others follow much like freeRADIUS is the reference implementation for RADIUS.