I’m running the examples, and with each one I get a banner at the start,
“Explorer pHat Detected…”
and after my code runs, a series that starts with
“Explorer Hat exiting cleanly…”
How do I turn these messages off and only see the print calls I do in my code?
TIA
I was afraid you’d say that. I went looking at the examples and didn’t see anything obvious as to why you get those banners? I have several Explorer pHats here, haven’t played with one in a long time though. Mine all run headless so I wouldn’t see those massages anyway. I’m using mine to drive motors for some rovers.
I don’t have time to do anything tonight but I will try and dig one out tomorrow and run some examples.
I’m guessing the explorer phat detected is happening with (right after) the import explorerhat.
And the Explorer Hat exiting cleanly right after the exit command.
It’s odd, as with an enviro pHat, I don’t get any “extras” when I run my scripts. (I’m using python-script in nodejs to get the output so I want it simple).
I don’t see anything in the env that might trigger messages like this, and what I installed is the latest libraries as of today.
I’ll play around with a couple of my Pi’s tomorrow and see what messages I get. I don’t have an enviro pHat but I have a Pi with a BMP680, LED shim etc connected. A pirate radio with a pHat Beat too. These all normally run headless but I’ll hook up a monitor before I boot them up. They all boot to command line so if those messages are there I should see them.
The ones you see when doing the exit are likely normally shown by default. I use the shutdown command but switch it to exit if I’m testing code modifications. A quick edit of my python file and I can check those messages. And see what comes up on shut down. I’ll post back what I find tomorrow.
Just FYI my python files are run on boot up via crontab. I shut down my Pi with the os.system("sudo shutdown now -P")
If I just want to stop my running python file I use raise SystemExit
I just ran the test.py and I got the Explorer pHAT detected message. Had to quickly grab my rover as it started to try and drive off of my table, lol.
I’m sure I’d get the other prompts too if I did an exit. That must be written into the library? @gadgetoid Phil or @sandyjmacdonald Sandy may know how to suppress them? I don’t.