Page 1 of 1

python script result in Terminal - hazel capture result?

PostPosted: Fri Jul 27, 2018 12:14 am
by NoodleNewbie
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!

Re: python script result in Terminal - hazel capture result?

PostPosted: Fri Jul 27, 2018 10:36 am
by Mr_Noodle
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.