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

EXP: use py check_signals() to catch CTRL-C #387

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ctb
Copy link
Collaborator

@ctb ctb commented Jul 12, 2024

Fixes #40.

Per #40 (comment),

so there's a much simpler way via pyo3! I just enabled this in the directsketch plugin:

  1. Pass in py /_py from lib to main function
  1. Include use pyo3::prelude::*; and call py.check_signals in main function:

Related issues:

@ctb
Copy link
Collaborator Author

ctb commented Jul 12, 2024

Main problem right now - can't use py.check_signals() inside a closure 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enable CTRL-C in rust code?
1 participant