gnu-octave / symbolic

A Symbolic Package for Octave using SymPy
https://octave.sourceforge.io/symbolic/
GNU General Public License v3.0
151 stars 36 forks source link

pythonic: add `dbout` command #1210

Closed cbm755 closed 2 years ago

cbm755 commented 2 years ago

@alexvong243f pointed out that dbout does not work on pythonic backend.

Possibly its just print? Anyway, needs to be added to python-header or equivalent.

alexvong243f commented 2 years ago

I think using logging.debug or logging.info is a more common way to do it. (We can add a FIXME comment if we don't want to change it now.)

WDYT?

cbm755 commented 2 years ago

Background: my debugging style is just print. But you cannot use print in popen2 ipc mechanism (b/c the stdout is used for the communication). So I made dbout. (In those days I did not know about logging module.)

In my experience in other projects, logging needs some config boilerplate.

I'd suggest just porting dbout to pythonic, at least in the short term. But if then both dbout's can be can be replaced with logging, I'd be happily test a MR for that, later.