Learning some Python via pyspread (playing)
Having come across nomacs graphics viewer, which uses Qt5
and then an animated webp to git convertor written in Python,
I've become interested in both Qt apps more generally and also Python (using or not using qt.
Like I said elsewhere, I don't know Python coding at all, but came across a spreadsheet (called pyspread - version 1.99.7) written in python(ver 3); also relies on PyQt (python-pyqt5 in Arch Linux repos) which is auto installed as dependency as far as I remember. It's a three dimensional spreadsheet - i.e. 3D matrix (X, Y, Z axes - so lots of 2D tables sitting on top of each other; in attached image, Z is three - like 3 excel tabs).
"pyspread" is no ordinary spreadsheet (though looks like one on first sight) - none of the usual spreadsheet functions/formulas work(!), but... instead, all the cells understand Python, so can use very powerful Python functions/formulas/macros and learn a bit Python as you play with it! I've quickly worked through the pyspread tutorial this evening and now see how to basically use it (now I just need to learn some more basic Python to write formulas and macros for entering into the cells. I rather think this pyspread could be used to write some really powerful utility/apps since Python has so many useful libraries to do so many things - the way the optional matplotlib works makes me think this could be a very powerful application. Okay, so anyone thinking it will be easy to convert an Excel-type spreadsheet to this is mistaken - it's very different indeed... forget that idea, but instead think of it as a great resource to practice learning basic Python on...
https://pyspread.gitlab.io/
https://gitlab.com/pyspread/pyspread/-/tree/master
pyspread is a non-traditional spreadsheet application that is based on and written in the programming language Python.
...
pyspread expects Python expressions in its grid cells, which makes a spreadsheet specific language obsolete. Each cell returns a Python object that can be accessed from other cells. These objects can represent anything including lists or matrices.
...
Cells may display text, markup, images or charts
...
Directly using Python code in a grid is a core feature of pyspread. The target user group has experience with or wants to learn the programming language Python
Was trivial to install on my WDL_Arch64 system (which is pretty much the case for anything I've stumbled across):
Code: Select all
pacman -S qt5-base qt5-svg
then I installed pyspread itself (as normal user) from AUR. Just did the usual git clone method, followed by makepkg -si to install, for that. I pretty much never use any kind of AUR helper.
Optional (for charts/graphs):
Code: Select all
pacman -S python-matplotlib
(No, I wasn't using Masterpdfeditor... I just was experimenting with embedding an image file into one of pyspread cells - happened to be image of masterpdfeditor info page).