python script result in Terminal - hazel capture result?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi

I have a hazel rule, run Shell Script (embedded script), running a python3 script successfully.

However if I run this python3 script in terminal, I receive output -- which I like to save for later reference.
I would like Hazel to capture this output someway and save also. Is this possible or dreaming?

If possible, I am not sure what is the best approach to capture this output as I do not know much about shell scripts.
Any direction would be great.

Do I seek to capture the script output into a .txt file?
e.g.
turn debug on
write to text file

Thankyou for great your help!
NoodleNewbie
 
Posts: 34
Joined: Fri Jul 13, 2018 5:17 pm

Hazel captures the output itself and will output it to the logs if you turn on debug mode (https://www.noodlesoft.com/kb/hazel-debug-mode/)

If you want to save it elsewhere, you'll have to re-direct it inside the script. Not as familiar with Python but I would guess you need to re-direct stdout and stderr to a file.
Mr_Noodle
Site Admin
 
Posts: 11250
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support