Re: [GNC] Another Potential Software Defect

2022-08-10 Thread Robert Simmons
Also, if you're doing everything in JupyterLab like I am, you can use:

%load_ext wurlitzer

in the cell to suppress everything from C/C++ in that particular cell.

https://pypi.org/project/wurlitzer/
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Another Potential Software Defect

2022-08-10 Thread Robert Simmons
The following is, of course, not recommended. Those errors are pretty
difficult to suppress because they're coming from C/C++ stdout. If you want
to hide them, contextlib.suppress and contextlib.redirect_stdout both do
not work. However, there is a python package called wurlitzer that does the
trick.

import wurlitzer

with wurlitzer.pipes() as (out, err):
job = gnucash.gnucash_business.Job(book, '1', cust, 'Build Deathstar')

you can also just do:

with wurlitzer.pipes():
job = gnucash.gnucash_business.Job(book, '1', cust, 'Build Deathstar')

and just drop the error messages on the floor until the underlying software
defect is fixed.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.