As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label Tk. Show all posts

Carrot, never got to plant it from store bought, but that could be I was doing it wrong. Although the carrot top that Ive been caring everyday still going lush green, but I am afraid once I plant it in soil, it soon would rot just like many that I had tried before.

It finally came to me that the reason they all rot is because they were cutting, if I plant they whole, their natural skin is still intact. So, I planted two small carrots, not baby one, just about twice or thrice of my thumb. Not sure if they would have enough energy stored in their root, maybe that doesnt matter much once they can still get from soil. I will see.

Nibbling small carrots, I only did that last year. To me, carrot was always a vegetable that had to be cooked, but not anymore. The taste and sweetness are incredible, and the crunchiness makes eating one more interesting. The thin root in the end and little top can also be eaten without no effort at all.

Another comment on my Tk/Ttk progress bar example and I finally have enough of it, a big white-on-red text should be another to tell them, well, thats Id hope. But, we ended up exchanging more than 10 comments, not bad conversations.

What else?

  • Drying a 15cm long red pepper, its nearly uniformly round lengthwise about 2cm in diameter. Not sure if its Romero pepper or Serrano pepper, but this one really has smooth skin.
  • While I was eating a wax apple (Syzygium samarangense, also known as was jambu), I saw a big seed inside, that I have never seen before, usually they would be tiny dark bits, but this seed seems mature. I am going to plant it.
  • Finally, Google Consumer Surveys Website Satisfaction is showing responses, but only one analyzed and still 0 for normal one.
  • My #1000 READYT project is about half done, need to finish the opening and ending and to work with audio.
  • Bird feeder definitely is working because there was nothing left in the bottle this afternoon.

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()

Ive 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 its 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 its 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 Gods words, there is still a huge distance between God and our BDFL.

Hmm, two space and one space gaps, interesting.