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

File Reload of natlink should restart the whole python "subsystem" #28

Open
quintijn opened this issue Dec 20, 2020 · 13 comments
Open

File Reload of natlink should restart the whole python "subsystem" #28

quintijn opened this issue Dec 20, 2020 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@quintijn
Copy link
Contributor

No description provided.

@quintijn
Copy link
Contributor Author

At line 200, the reloadPython is performed, I think this is the function that is called when the File, Reload button is pressed in the Messages window.

It would be nice, when the whole python "subsystem" is closed down and restarted, so all underlying modules are also refreshed (reloaded) after changes. Hope this is possible to realize at some time.

@quintijn quintijn added the enhancement New feature or request label Dec 20, 2020
@LexiconCode
Copy link
Member

LexiconCode commented Sep 2, 2022

If this were to be implemented please read the following #129 (comment) as it has implications for restarting the Python subsystem.

@drmfinlay
Copy link
Member

This is what the Reload button is supposed to do, right? I could look into fixing it.

@LexiconCode
Copy link
Member

This is what the Reload button is supposed to do, right? I could look into fixing it.

That's my understanding, it's meant to reload the the interpreter.

@drmfinlay
Copy link
Member

drmfinlay commented Jun 10, 2024 via email

@drmfinlay drmfinlay self-assigned this Jun 10, 2024
@drmfinlay
Copy link
Member

drmfinlay commented Jul 1, 2024 via email

@LexiconCode
Copy link
Member

Could it reload the full pyrhon interpreter?

@drmfinlay
Copy link
Member

drmfinlay commented Jul 2, 2024 via email

drmfinlay added a commit to drmfinlay/natlink that referenced this issue Jul 2, 2024
drmfinlay added a commit to drmfinlay/natlink that referenced this issue Jul 2, 2024
@drmfinlay
Copy link
Member

drmfinlay commented Jul 2, 2024 via email

@drmfinlay
Copy link
Member

drmfinlay commented Jul 5, 2024 via email

@drmfinlay
Copy link
Member

The issue I rediscovered above with interpreter reinitialization has implications for Natlink's Python thread support. If the reload button cannot practically reinitialize the interpreter, thread support might just as well be enabled by default.

@quintijn
Copy link
Contributor Author

Why not do so? Honestly, I never saw any difference in the working of Natlink with or without the threading option. If you think on is OK, just put the default on!!

@drmfinlay
Copy link
Member

drmfinlay commented Aug 20, 2024 via email

drmfinlay added a commit to drmfinlay/natlink that referenced this issue Oct 22, 2024
Re: dictation-toolbox#213.

The new function is setMessageWindow().  I have documented it in the
NatlinkSource/natlink.txt file.

It is now necessary to call this function with a Python callback to
enable the message window.  The default callback will soon reside in
the natlinkcore code and be set from appsupp.cpp.

Since it is related, this changeset includes modifications to the
message window's File>Reload logic, re: dictation-toolbox#28.  The default callback
will do a narrower reloading of user modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants