I was wandering when I stumbled on Charsor, which generates a heatmap based on cursor positions. The same thing that I have also done two years ago, X cursor heatmap in terminal using xcinfo, but this new comer uses Tk for screen size and cursor position, and a library for heatmap.

However, none of those above is the reason of writing this post, which is the following piece of code:


import Tkinter
from time import sleep
from time import strftime
import heatmap
import os

# [snip] #

# Thanks mouad
screenWidth = cursor.winfo_screenwidth()
screenHeight = cursor.winfo_screenheight()

I’ve seen many Python codes, all in different styles, and I thought I have seen all, because aligning variable assignments are nothing new to me, I must have seen one or two. Or those spaces wrapping inside of parentheses like some C or PHP codes. Really, I thought I have seen all.

But, never in my life I have ever seen a code that has had the import statements all align up as if it’s for the commander-in-chief to inspect. Truth is, this kind of style has never occurred in my mind.

Warning

Do not click the link, then open an issue, and tell that guy to PEP 8 up his *BEEP*. It is wrong and cyber-coding-bullying.

And, I must address this, I do not object any Python coding styles as long as it’s consistent throughout the codes. If you are a PEP 8 firm believer, please do not go scolding this author, take a cold shower to chill. PEP 8 is not the God’s words, there is still a huge distance between God and our BDFL.

Hmm, two space and one space gaps, interesting.