Ability to pass Picosat a file argument when verbose>0 #7
Labels
locked
[bot] locked due to inactivity
stale::closed
[bot] closed after being marked as stale
stale
[bot] marked as stale due to inactivity
Currently Pycosat sets up a Picosat instance and you can set the latter's verbosity. However, Picosat's verbose output goes to stdout only. I would like the ability to set a different destination for that logging output. Even better would be a callback but based on reading around in
picosat.h
it looks like it can only take a C-levelFILE*
pointer. So I guess the most Python-friendly way to do it would be to create a pipe, hook one end of it up to Picosat, and have the other end dump into a Pythonio.StringIO
buffer (or aio.BytesIO
buffer, depending on what Picosat's approach to text output is). The advantage of this would be that it would be easier to embed Pycosat in a web app where you need to control the logging destinations more closely than with a command line app.(I would do this myself but I couldn't figure out how to make files from Python's C API.)
The text was updated successfully, but these errors were encountered: