Tag Archives: python

Simple colored output in python 3 using termcolor

Visually scanning long lines of output can cause the eye to lose track of the line you are interested in. Wouldn’t it be nice if you could simulate lineprinter paper? In this article, I’ll show you how with termcolor. It’s … Continue reading

Posted in Python | Tagged , , | 1 Comment

Logic programming example: unit conversion using Datalog

Logic programming can reduce your code size, and make deductions based on facts. I’ll illustrate this using pyDatalog, a Datalog implementation in Python 3, to create a unit conversion program. I provide it wil some basic facts about how many … Continue reading

Posted in Computers | Tagged , , | 1 Comment