Am I understanding this properly? or does that method really return
   a view?

No, the namespace browser always returns serialized copies of the objects present in the console.

   I’d like to be able to be able to control the device through both
   the console and a UI plugin

I still don’t understand what you want to do. Do you want to create a Spyder plugin for your experiment? Or do you already have a GUI interface to it?

Cheers,
Carlos

El 14/02/18 a las 07:12, ‘UHV’ via spyder escribió:

Thanks for the suggestion, but I'm not sure that `refresh_namespacebrowser` will work the way I need it to. If I understand it correctly, it calls for the console to return the serialized contents of the console namespace. The objects I want to exchange are instances that contain things like open COM ports or device handles that can't be pickled. And even if they could, the widget and console versions of the object would be copies of one another (not views) and changes to one would not be reflected in the other (without some sort of refresh mechanism to make a new copy). Am I understanding this properly? or does that method really return a view?

Thanks.

On Tuesday, February 13, 2018 at 3:00:17 PM UTC-4, Carlos Córdoba wrote:

    Hi,

    Now we have |refresh_namespacebrowser|:

    
https://github.com/spyder-ide/spyder/blob/3.x/spyder/widgets/ipythonconsole/namespacebrowser.py#L57
    
<https://github.com/spyder-ide/spyder/blob/3.x/spyder/widgets/ipythonconsole/namespacebrowser.py#L57>

    which is a method of every console. Perhaps that’s what you need?

    Cheers,
    Carlos

    El 13/02/18 a las 12:13, ‘UHV’ via spyder escribió:

    I'd like to share an object between the console and the GUI front
    end, so that changes made by one are reflected in the other. The
    objects I want to share are interfaces to devices and
    instruments, so only one instance of each is allowed (or even
    meaningful). I'd like to be able to be able to control the device
    through both the console and a UI plugin. Separately they work,
    but I haven't found a way of sharing the device. The method used
    by the `namespace_browser` is to push and pull copies of the
    objects. That won't work in my case. In the past, with the (very)
    old style console this could be done with the
    `update_namespace()` method.


-- You received this message because you are subscribed to the
    Google Groups "spyder" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to spyderlib+...@googlegroups.com <javascript:>.
    To post to this group, send email to spyd...@googlegroups.com
    <javascript:>.
    Visit this group at https://groups.google.com/group/spyderlib
    <https://groups.google.com/group/spyderlib>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.
    ​

--
You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+unsubscr...@googlegroups.com <mailto:spyderlib+unsubscr...@googlegroups.com>. To post to this group, send email to spyderlib@googlegroups.com <mailto:spyderlib@googlegroups.com>.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

​

--
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to spyderlib+unsubscr...@googlegroups.com.
To post to this group, send email to spyderlib@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to