Skip to content

Allow arbitrary choice of printer to be used by init_printing()

jbm950 edited this page Apr 12, 2016 · 3 revisions

Author(s): Brandon Milam
Status: Discussing/Planning

Currently init_printing() works by determining what printer would be best for the environment that it is being run in. This project proposes to add the option for the user to override this decision and choose a specific printer from the available sympy printers.

This idea was brought up in issue #10834 and in pull request #10835.

In the pull request it was discussed whether or not init_printing() should be allowed to pick printers for which the environment does not allow rendering (such as latex printer in terminal). It would need to be decided then if this functionality of avoiding printers that the environment is incapable of rendering should be kept if a user determined printer is selected.

Comment by Brandon: Would it be considered a break of consistency if the user was allowed to select non-renderable printers? I believe that running without a specific printer selected should return the best renderable printer for the environment but that the user should be allowed to select any printer that is available. In this way the user can still expect "best renderable" behavior when not specifying a printer but can also expect to get to use any printer through a user selected input

Things to watch for during implementation:

  • If the no_global flag is set to True, many input arguments will be automatically passed to the printer. Any printer added to init_printing() would need to be able to handle these input arguments. Note: this functionality is slightly altered by PR #10944 which at the time of writing this page is still under review. The concern for additional printers still holds regardless of whether or not this pull request is merged

083153272007

Clone this wiki locally