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

How to run browser without blocking the REPL #2

Open
GlassGruber opened this issue Aug 19, 2018 · 2 comments
Open

How to run browser without blocking the REPL #2

GlassGruber opened this issue Aug 19, 2018 · 2 comments

Comments

@GlassGruber
Copy link

Hey there!
Thank you for this, it's extremely useful!

Still I'm trying to figure out how I can run the browser without blocking the REPL, so that I can check the dumped data for what I need and go on in the REPL with the window open as a reference if I need it again.

I'm a bit naive and don't know much about QT, is it possible to launch the browser in a separate thread or something similar so to have the REPL free to continue?

Thank you for time!

@titusjan
Copy link
Owner

For this you have to use IPython with the %gui qt magic command to enable integration with the Qt event loop. It used to work with the regular Python prompt but I don't think it works anymore, plus IPython is much better for interactive work anyway.

So, in IPython prompt type %gui qt, or use ipython --gui=qt to start up IPython. Then start the object browser.

The '%gui' magic command makes IPython alternate quickly between processing Qt events and handling the REPL loop. There is no threading involved.

@GlassGruber
Copy link
Author

I see thank you for your answer! I've never fiddled with IPython, guess I will start now 👍

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

2 participants