The Problem and The Passion: Pursuit to the Bitter End

 

Charleton Heston might have called this post, "The Agony and the Egg-thingy on my Face" (instead of 'and the Ecstasy')

At the end of the day all I got for my unrelenting efforts was a "Hello World" printed in red on my Python output console.


(Actually it wasn't day's end but rather an all-nighter)

You might ask why I am devoting a whole TLDR post to such an uninspiring outcome? Well, it's beca
use there is a morale to be drawn this long tale about the woe and the un-woke work that went into the all-night unraveling of the puzzle of why RICH was not initi
ally producing any colors.  [TLDR = Too Long to Directly Read ]

Turns out the problem was in the Pycharm IDE I'm using, not in the Python code.

At times, I preach to newbies on the coding discussion boards (e.g., Reddit) that "pain" is good for them, and that struggling to find an answer is how you grow, learn and "make it stick".

(By "newbies", I mean here those who are much newer than me on their Python learning journey. I still consider myself a newbie, although not a fresh-off-the-boat one.)

My advice about how good it is to get bit by problems, to twist in the agony of not being able to solve them right away and to learn from the experience is something that applies to me just as much as to others. You stumble across new concepts as you search for answers.

Long story/short (long is below) , the problem lay in my Pycharm Run/Debug Configurations not in my Py code. Took me most of the night to finally figure it out by kissing one dead-end frog after another until I ran across this ancient Reddit posting (here). And that led to finding the clearer Stack explanation (here)




And as said above, the reward was a meager "Hello World" displayed in red on a black background.

But it's what I learned along the way that counts:

(1) Pycharm doesn't provide you with full terminal display capabilities unless you activate its Terminal Emulation feature

(2) The emulation runs in its own environment for the selected module. That affects the path for you imports. You got to change them to "from (dot) import X as alias"

(3) ...  
TO BE CONTINUED ...

MORE TO EXPLORE
(4) RICH Documentation (Official here)

(5) 

Comments

Popular posts from this blog

Links for Python Noobs

The Learn HOW to Learn Page

Advanced Python Links Accumulation Page