[Paraview] connecting buttons and python

Sgouros, Thomas thomas_sgouros at brown.edu
Wed Feb 21 19:44:21 EST 2018


Thank you that's very helpful. Where will I find how to define the
protocols on the python side? I've only found a wslink example that looks
like this:

from wslink import register as exportRPC
from wslink.websocket import LinkProtocol

class myProtocol(LinkProtocol):
    def __init__(self):
        super(myProtocol, self).__init__()

    @exportRPC("myprotocol.testButton")
    def testButton(self, nothing):
        print("******* HELP ********")

Pvpython isn't happy with this, but I'm not sure where to look for the
right way to do it.

Thank you,

 -Tom

On Wed, Feb 21, 2018 at 6:55 PM, Scott Wittenburg <
scott.wittenburg at kitware.com> wrote:

> Yes that link is old and broken, but if you navigate through the api docs
> links, that is working.  Here's the direct link to the page you couldn't
> find though:
>
> https://kitware.github.io/paraviewweb/api/IO_WebSocket_
> ParaViewWebClient.html
>
>
>
> On Wed, Feb 21, 2018 at 4:43 PM, Sgouros, Thomas <thomas_sgouros at brown.edu
> > wrote:
>
>> Hello all:
>>
>> Got some nice looking buttons and widgets, but I can't seem to find
>> examples of how to deliver the button press or other widget output to my
>> pvpython server. I imagine the steps are:
>>
>> 1. Create a protocol on the python side. Can I use wslink.register, or is
>> there paraviewweb functionality I should be using?
>>
>> 2. Create a matching protocol on the js side, with
>> ParaviewWebClient.createClient(), but I'm not seeing how to link the
>> protocol to a function that can be linked to a button press.
>>
>> Also, this page, found via a google search, seems potentially useful, but
>> gives me a 404.
>>
>> https://kitware.github.io/paraviewweb/api/ParaViewWebClient.html
>>
>> Many thanks,
>>
>>  -Tom
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180221/1a134706/attachment.html>


More information about the ParaView mailing list