4 ms·
I've put a bit of effort into trying to make it work with the python apps we write at my company. We have a lot of electrical engineers who only write python an
by ktm5j 2y ago
I've put a bit of effort into trying to make it work with the python apps we write at my company. We have a lot of electrical engineers who only write python and we're butting up against the limit of what the language can do as far as the data we need to process..
It's worked well in some cases, but the main situation where we needed it to work was with a GUI application where there was no separation between computation and the GUI elements.. I tried really hard, and got frustratingly close, but could not build wxPython that would work using pypy.
But it's super cool imo, as someone who has to write/maintain python code it's awesome to see some innovative work to make the language faster.
- stuaxo 2y agoGtk could be an option it used to not work well at all, but since they improved their C binding support it got better.
- ktm5j 2y agoGood to know, thanks!
- giancarlostoro 2y agoI havent used it in a long time but did you try Qt as well? PySide worked insanely nicely for me. Although this wasnt with PyPy to be fair.
- ktm5j 2y agoWell the thing is that it's code that's already been written, and honestly is kind of a mess. It would take more effort than it's worth to try and rewrite using a different GUI framework. I much prefer Qt but this was written before I started here so it is what it is :/ The longer the test runs we end up losing data because they're looping over a dataframe that keeps growing and growing and the program just can't finish that loop in the 2 seconds that it has to run. But it's not a big enough deal for us to fix
- westurner 2y agoFWICS pyqtwebgraph has a TableWidget: https://pyqtgraph.readthedocs.io/en/latest/api_reference/widgets/tablewidget.html https://pyqtgraph.readthedocs.io/en/latest/api_reference/wid... https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/examples/TableWidget.py https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph... : > Extends QTableWidget with some useful functions for automatic data handling and copy / export context menu. Can automatically format and display a variety of data types (see setData() for more information DataTreeWidget handles nested structs: https://pyqtgraph.readthedocs.io/en/latest/api_reference/widgets/datatreewidget.html https://pyqtgraph.readthedocs.io/en/latest/api_reference/wid... SO says it's better to extend Qt QTableView and do pagination for larger datasets: https://stackoverflow.com/questions/61517220/pyqt-pandas-fastest-way-to-update-table-widget-data#comment108833723_61517220 https://stackoverflow.com/questions/61517220/pyqt-pandas-fas... https://www.pythonguis.com/tutorials/qtableview-modelviews-numpy-pandas/#pandas https://www.pythonguis.com/tutorials/qtableview-modelviews-n... pyqtgraph mentions CUDA and NumPy support, but not pandas. Hard to believe there's not yet specific support for drawing spreadsheets of pandas dataframes in qt or pyqtgraph yet. dask.DataFrame and dask-CuDF also support CUDA. sympy's lambdify function compiles readable symbolic algebra to fast code for various libraries and GPUs. The Dataframe Protocol __dataframe__ interface spec Purpose and Scope doc mentions the NumPy __array_interface__ protocol; which may do sufficient auto-casting to a NumPy array before trying to draw a data table with formatting derived from then-removed columnar metadata: https://data-apis.org/dataframe-protocol/latest/purpose_and_scope.html https://data-apis.org/dataframe-protocol/latest/purpose_and_... Practically, pd.DataFrame(,dtype_backend="arrow") may be a quick performance boost. Jupyter kernels with Papermill or cron and templated parameters at the top of a notebook with a dated filename in a (repo2docker compatible) git repo also solve for interactive reports. To provision a temporary container for a user editing report notebooks, there's Voila on binderhub / jupyterhub, https://github.com/binder-examples/voila https://github.com/binder-examples/voila or repo2jupyterlite in WASM with MathTex and Pyodide's NumPy/pandas/sympy: https://github.com/jupyterlite/repo2jupyterlite https://github.com/jupyterlite/repo2jupyterlite But that's not a GUI, that's notebooks. For Jupyter integration, TIL pyqtgraph has jupyter_rfb, Remote Frame Buffer: https://github.com/vispy/jupyter_rfb https://github.com/vispy/jupyter_rfb