-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Python Script progress log #4276
Comments
Something akin to a radio button next to the I think Orange would benefit a lot from a strong Python script widget, but I appreciate it's a relatively big project. Maybe after fixing this issue, we could separate out some smaller tasks, like:
Also (the biggest task), maybe we could improve the data table ( (sorry for hijacking your issue) |
This is because most people are used to working with pandas, but Orange's data structures are not like that. That said, this is something only @janezd can answer. |
While the script widget can be improved in lots of ways, the thing that annoys me the most is that stdout is not flushed while running. In this simple example,
hello world is printed three times when everything finishes, not every two seconds. The fix for this is probably just adding Also, in addition to printing actual stdout, I would suggest outputting the commands, like ipython does. So the output for the simple example above would be:
instead of just
Also, the most Orange-y way to indicate that things are running would be to add a progress bar. |
The widget uses def flush(self):
pass
qApp.processEvents() to the end of @ales-erjavec should say whether this is correct and safe. A better way could be to run the console in a separate thread. |
When does ipython output commands? |
|
The script must be executed in a separate thread to allow the main thread to update? But |
I moved Why is it prohibited (or just not recommended?) to call |
Assuming correct setup yes.
GUI updates cannot be processed from other threads. Calling processEvents() can only process events enqueued to the calling thread's event loop.
The most problematic is the execution (completion) ordering inversion due to reentry. Most of https://stackoverflow.com/questions/35561182/why-should-nesting-of-qeventloops-be-avoided applies ( Also https://lists.qt-project.org/pipermail/interest/2019-September/033855.html |
Currently the Python Script widget prints to the console only after it has finished running and there is no indicator of whether it is running or not.
It should be somehow indicated whether the script is currently running or not. Otherwise it is not clear whether 1.) the script even started running and 2.) why Orange is unresponsive.
The text was updated successfully, but these errors were encountered: