Skip to content

Revise the way outputs are printed to the console #25

@matthewcarbone

Description

@matthewcarbone

This has been causing me some headaches:

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:

  1. Simply use print, instead of redirecting stdout, allowing users to catch this in an outer context
  2. Allow the user to disable this block when initializing PdfFit.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions