Preemptive questions on the kivy_garden vispy

40 views
Skip to first unread message

BMW CXA672

unread,
Jan 14, 2021, 11:46:02 AM1/14/21
to Kivy users support
Hi All

This is my first question in this Forum. 

Thx for Kivy - it is a great package. 2/4 family members are currently using it and I plan to increase this number. :) 

I have been using Matlab since 1989, v 1.1 and started to switch to Python two years back. I still consider myself to be a noob on Python. 

That said, I am starting to get familiar with the bells and whistles of Kivy. As I have to do things parametric for my applications, I run the whole show from Python.  

As a next step, I planning to start using Kivy with plotting of fast measurement data. To do so, Vispy look like a nice package to examine. 

I find a Vispy implementation in Kivy garden. I have yet to try it out though.  https://github.com/matham/kivy_garden.vispy

Simply to avoid treading down a wrong path and spilling unnecessary energy.

Are there any recommendations or expectations wrt the Vispy flower wrt Kivy version, i.e. should I expect 1.11 to work as well as version 2.0? 

Searching, it appears the intention is/was? for this package to become a regular Kivy function. Is this still so, i.e. differently stated, am I barking up the right tree or should I divert attention elsewhere?

Any examples on the use of this flower or other suggestions are most welcome. 

I am currently at Kivy 1.10. 

Thx for your help in advance.

Sincerely
Claes
 

Alexander Taylor

unread,
Jan 16, 2021, 4:12:35 PM1/16/21
to Kivy users support
The garden packages aren't in general very actively maintained. This might work, but you can only find out by trying it. I doubt there are many users, if any, making much use of it.

It's likely that for ideal results, you'll need to understand how the kivy/vispy interaction is handled, and be willing to change the code to suit your requirements.

BMW CXA672

unread,
Jan 18, 2021, 8:40:04 AM1/18/21
to Kivy users support
Hi Alexander

Thx for your reply. :)

Your answer is that expected. 

Yes, I realize that I'd have to put an effort into Vispy which is experimental and that I cannot ask for 'free work'.  

I did fiddle around a little before making this reply. 
  • The standard vispy installation seems to run fine when testing a few demo examples. 
  • I managed to install both the kivygarden.vispy and the cython_flower, the latter by downloading the package. 
  • Running the test_import.py does not do much. 
  • Running the commands therein interactively from a Python window throws up a window and a wait symbol. To look at things from a bright side - it does not crash even though not much happens.
  • Searching around, trying this and that, I manage to get a window with black background to show the text   Demo flowerDemo flower, see below. 

VispyFlowerDemo.JPG



I view getting this function to work an effort that may take time to run stable and I am also aware that it will have a very small user base - at least for now. 

That said, what I am fishing after is some kind of guess on whether this would be an uphill struggle, a solo effort or perhaps a team effort? 

I found somewhere searching internet a statement that the long term intention of the Vispy flower was for it to become a Kivy plot function. To me it seems a logical choice as the rest of Kivy uses OpenGl (with me currently knowing nothing about OpenGL).  

Is this intention still valid, or has it been abandoned, e.g. due to unforeseen difficulties in getting Vispy to play nice with Kivy?

Also, if there exist more usage examples, or some hints on how it should be used - it would greatly help in getting started.  

Sincerely
Claes
 

BMW CXA672

unread,
Jan 18, 2021, 8:44:31 AM1/18/21
to Kivy users support
Here is the code snippet I used. 

from kivy.app import App
from kivy.uix.relativelayout import RelativeLayout
from kivy.uix.widget import Widget
from kivy_garden.cython_flower import CythonFlowerLabel

class MyApp(App):
    def build(self):
        a = RelativeLayout()
        label = CythonFlowerLabel()
        assert label.text == 'Demo flower' * 2
        a.add_widget(label)
        return a

MyApp().run() 

BMW CXA672

unread,
Jan 18, 2021, 11:49:57 AM1/18/21
to Kivy users support
Hi again Alexander

To clarify my question - can you pls indicate how one moves from simple text to using actual vispy and/or matplotlib?

Some examples would go a long way if such exist. 

Sincerely
Claes

Alexander Taylor

unread,
Jan 18, 2021, 1:01:58 PM1/18/21
to kivy-...@googlegroups.com

> That said, what I am fishing after is some kind of guess on whether this would be an uphill struggle, a solo effort or perhaps a team effort?

I'm sure one person can make it work. It doesn't need a lot of code writing.

> I found somewhere searching internet a statement that the long term intention of the Vispy flower was for it to become a Kivy plot function. To me it seems a logical choice as the rest of Kivy uses OpenGl (with me currently knowing nothing about OpenGL). 

It's unlikely there was ever any intention to bring it into core kivy.

> Also, if there exist more usage examples, or some hints on how it should be used

Probably not.
--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/Q6CznW3IE64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f6a728ea-afa4-4b77-a65a-b8f9b08d7985o%40googlegroups.com.

Alexander Taylor

unread,
Jan 18, 2021, 1:02:34 PM1/18/21
to kivy-...@googlegroups.com

I'm not sure what you mean by this.

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/Q6CznW3IE64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Matthew Einhorn

unread,
Jan 19, 2021, 5:06:22 AM1/19/21
to kivy-...@googlegroups.com
I wrote the flower, but while I don't remember how far I got with it, it was definitely not functional i.e. I didn't finish it. I can't say at the moment how much additional work would be needed to get it working.

But from what i remember, something was wrong with the opengl commands as it interacted with kivy and I gave up as I was mostly doing it because I was trying to get webgl working for kivy, which vispy had a backend for, so I was trying to learn more about it though vispy. Also, iirc, vispy dev seemed to have stalled a bit, although maybe because it's stable.

You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d6cbb7ed-edf7-bd19-2780-900cae17dced%40gmail.com.
Reply all
Reply to author
Forward
0 new messages