User bio
404 bio not found
Member since Mar 23, 2021
Posts:
Replies:

I've never tried with a custom buffer but I know you can redirect python stdout pretty easily using something like this:

sys.stdout = open('file', 'w')

Or this to completely suppress output:

sys.stdout = open(os.devnull, "w")

And then when you're done, use this to revert:

sys.stdout = sys.__stdout__

Dominic Chui · Apr 7, 2022 go to post

Thanks, that makes sense (although it does seem like parts of the documentation are somewhat misleading and could be improved.)

As a follow up question, is there an idiomatic way of checking whether a dynamic SQL SELECT query returns any values then?

Certifications & Credly badges:
Dominic has no Certifications & Credly badges yet.
Followers:
Dominic has no followers yet.
Following:
Dominic has not followed anybody yet.