-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Milestone
Description
This has been causing me some headaches:
diffpy.pdffit2/diffpy/pdffit2/output.py
Line 28 in c4a2989
| def redirect_stdout(dst): |
Every time PdfFit is instantiated, there is a block of text printed to the console. This similarly happens in other situations. I cannot catch this output because within the PdfFit.__init__ there is another line that globally overwrites stdout, making it impossible for me to redirect using e.g. a context manager. I'm not sure this is good practice: is there any particular reason this is done? I understand that it's important to the authors to display the copyright statements and whatnot, but surely it's reasonable to allow the user to disable this?
I have two suggestions:
- Simply use print, instead of redirecting stdout, allowing users to catch this in an outer context
- Allow the user to disable this block when initializing
PdfFit.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels