dictation-toolbox / natlink

Natlink provides the interface between Dragon and python
https://dictation-toolbox.github.io/natlink/
Other
25 stars 17 forks source link

Make natDisconnect() be called upon ext module deallocation #211

Closed drmfinlay closed 1 month ago

drmfinlay commented 1 month ago

These changes make it so the natDisconnect() function is called for you automatically if you forget it. No effect in-process.

LexiconCode commented 1 month ago

So when Dragon is closed without explicitly closing out of process Natlink a the GUI?

drmfinlay commented 1 month ago

No, these changes won't make out-of-process natlink disconnect on Dragon shutdown. They allow the following sort of thing to work without hanging:

>>> import natlink
>>> natlink.natConnect()
>>> exit()
drmfinlay commented 1 month ago

Thanks for merging this.

Incidentally, it is possible to disconnect on shutdown. It's just a bit tricky.

On Wed, 25 Sep 2024 17:14:13 -0700 LexiconCode @.***> wrote:

Merged #211 into master.

-- Reply to this email directly or view it on GitHub: https://github.com/dictation-toolbox/natlink/pull/211#event-14407354504 You are receiving this because you authored the thread.

Message ID: @.***>