Open chir-set opened 1 month ago
Running "json.dumps(list(globals().keys()))" result is "["name", "doc", ... very loooooong list... "json"]"
That's due to this line. It is probably overkill for production but it's helpful when developing this kind of app. Probably there should be a web widget property that controls whether the command and result should be printed or not.
Some of the other outputs need to be debugged in the scripted writer and the subject hierarchy plugin code or in the monaco config. @oothomas it would be great if you could investigate.
pts = vtk.vtkPoints() pts.InsertNex
the dropdown list does not show anything with 'InsertNex*'.
This is expected because unlike in the python console the first line hasn't been executed yet, so the string pts
doesn't correspond to an object yet. This is going to be an interesting question for next steps of development for project. Perhaps we'll want to have a console-like mode where lines are executed on Enter
and then the objects are available for completion on the next line. That would be pretty compatible with the way I use external editors for test scenarios, where I write code that can be re-executed from the top to recreate the test, often with time-consuming parts like data loading bracketed in try/except blocks. Then I experiment with code by going back and forth to the console and pasting what works into my editor buffer. It would be great if the SlicerEditor could unify this into a seamless operation, but we need to expose this in a way that makes sense.
That's due to this line.
Good to know, would commenting it in a local branch be a good idea for someone that won't debug in this particular case?
This is expected... hasn't been executed yet
Ok, then more can't be expected now.
Thank you.
That's due to this line.
Good to know, would commenting it in a local branch be a good idea for someone that won't debug in this particular case?
Yes, you could comment it out to clean things up locally, but adding a boolean property to the qSlicerWebWidget
named something like debugEvalRequests
that is false
by default would be a nice addition since we probably don't want that much printing unless we are developing or debugging.
These messages appear in the terminal (not Python console) very often:
These ones appear in the Python terminal too:
Some of these suggest something went wrong.
Indeed, code completion works partially.
For example, on typing:
pts = vtk.vtkPoi
the dropdown list filters anything with 'vtkPoin*'.
However, on continuation:
the dropdown list does not show anything with 'InsertNex*'.
I'm on Arch Linux, Qt5 5.15.14+kde+r143-1. Qt6 coexists, but Slicer does not use it. It's self-built Slicer and SlicerEditor of course.
I think it should be a great tool when the usability gets improved.
Regards.