Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to pass Picosat a file argument when verbose>0 #7

Closed
wkschwartz opened this issue Nov 11, 2013 · 1 comment
Closed

Ability to pass Picosat a file argument when verbose>0 #7

wkschwartz opened this issue Nov 11, 2013 · 1 comment
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@wkschwartz
Copy link
Contributor

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-level FILE* 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 Python io.StringIO buffer (or a io.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.)

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Mar 15, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label May 14, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

1 participant