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

Add a Console Widget #370

Open
gselzer opened this issue Oct 10, 2024 · 4 comments
Open

Add a Console Widget #370

gselzer opened this issue Oct 10, 2024 · 4 comments

Comments

@gselzer
Copy link
Contributor

gselzer commented Oct 10, 2024

It would be nice if we had a centralized console widget. For now, the main thing that would be nice is access to the CMMCore(Plus) instance, although we should certainly also have the API to add additional variables.

There are already a couple prototypes we could draw from. I added a RichJupyterWidget-based console to my sandbox here, but this may be overkill. @simonecoppola has additionally filed fdrgsp/micromanager-gui#22, but that would require additional effort and bugfixes.

Thoughts @tlambert03 @fdrgsp @marktsuchida?

@fdrgsp
Copy link
Collaborator

fdrgsp commented Oct 11, 2024

I agree, @gselzer. After @simonecoppola mentioned it in fdrgsp/micromanager-gui#22, I also thought that pymmcore-widgets would be a good place for it.

@tlambert03
Copy link
Member

tlambert03 commented Oct 11, 2024

naive question (having not looked at anyone's code). In a sense, isn't qtconsole already this widget? And then, inasmuch as pymmcore-widgets is a component library (and not the final composed gui), what additional "wrapping" do we need to provide? Given that it brings in enough extra dependencies to make it a somewhat heavy addition, I think it should likely only be done by the final gui application (like @fdrgsp's app or https://github.com/pymmcore-plus/pymmcore-gui/issues). in napari, we actually eventually extracted our console into an independent package for exactly this reason.

edit: answering my own question - i guess @gselzer's point was that the additional wrapping would be injection of global variables into the console namespace. but there too, I think that's an application-level concern, not a library concern

@gselzer
Copy link
Contributor Author

gselzer commented Oct 11, 2024

Yup, for the reasons you mentioned I nearly filed this issue within pymmcore-gui, but I guess the reason I filed it here is because at the end of the day we're talking about adding a new widget, and all the widgets (currently) live here.

My main concern is avoiding duplicated effort, since we've already seen the beginnings of that. I think that the solution could occur here or on the application level, and see no problems with moving this issue over to pymmcore-gui.

@tlambert03
Copy link
Member

let's leave this here for the moment. but if it gets added, I would only want it as an extra pip install pymmcore-widgets[console]

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

No branches or pull requests

3 participants