1

Is there a way to write a standalone ipywidgets based GUI that doesn't rely on a hosting Jupyter notebook, i.e., that can be displayed from a regular python script?

I know about Voila and tkinter, and neither is what I want.

Bananach
  • 2,016
  • 26
  • 51
  • Panel has widgets too that run in WASM directly in the browser. See [here](https://twitter.com/JupyterTutorial/status/1584440212113231872) and links therein. There's examples using Panel [here](https://pyscript.net/examples/), [a couple under 'Pandas dataframe input and display' here](https://github.com/fomightez/pyscript_test#pandas-dataframe-input-and-display), and [here](https://amrrs.github.io/pyscript-upload-download-repl/). – Wayne Oct 31 '22 at 19:08
  • I think I totally missed the 'regular python script' yesterday and was focusing on you wanting to avoid hosting. What I really think you might like: There's [Qt Widgets](https://doc.qt.io/qt-6/qtwidgets-index.html) and the related [PyQtGraph: Scientific Graphics and GUI Library for Python](https://www.pyqtgraph.org/). These don't need Jupyter and in fact were developed separately before there were ipywidgets, I believe. – Wayne Nov 01 '22 at 17:52
  • @Wayne the reason I asked about ipywidgets is that i can easily display dataframes and plotly HTML charts with them. Can I do that with Qt too? – Bananach Nov 02 '22 at 08:34
  • 1
    It looks to me like handling a Pandas dataframe isn't baked in to PyQt and that you have to build in the viewer handling yourself. The example in the documentation for doing that is [here](https://doc.qt.io/qtforpython/examples/example_external__pandas.html). There seems to be some alternatives [here](https://stackoverflow.com/a/58323607/8508004) and [here](https://stackoverflow.com/q/44603119/8508004). There seems to be examples of using Plotly with it, too. See [here](https://stackoverflow.com/q/57063046/8508004) and [here](https://stackoverflow.com/a/60523577/8508004) and ... – Wayne Nov 02 '22 at 15:50
  • 1
    [here](https://stackoverflow.com/a/60566087/8508004). – Wayne Nov 02 '22 at 15:51

0 Answers0