Code Monkey home page Code Monkey logo

Comments (6)

takluyver avatar takluyver commented on July 17, 2024

Eventful was kept with widgets, which is the only thing in IPython that used it:

https://github.com/ipython/ipywidgets/blob/master/ipython_widgets/widgets/eventful.py

from traitlets.

jmsuresh avatar jmsuresh commented on July 17, 2024

I need eventful containers (List, Dict and Set) in my application. The link above is not working. Can anyone suggest what is the recommended module to use now in 2017?

from traitlets.

rmorshea avatar rmorshea commented on July 17, 2024

@jmsuresh I am unsure of why they were removed. However there is a pull request to implement them again - jupyter-widgets/ipywidgets#1071

from traitlets.

rmorshea avatar rmorshea commented on July 17, 2024

The above PR uses spectate under the hood:

pip install spectate

Check out the examples and let me know what you think.

from traitlets.

jmsuresh avatar jmsuresh commented on July 17, 2024

Thanks for this. I was trying to test this but could not as it depends on FrozenBunch which is not available in the version I have. Any suggestions?
I am trying to use this eventful container to do a clean MVC pattern for a GUI. I am wondering why there is no popular way to do this as this requirement should be very common.

from traitlets.

rmorshea avatar rmorshea commented on July 17, 2024

@jmsuresh, I am trying to find time to uncouple the pull request from its dependance on the (as yet) unreleased 5.0 version of traitlets. However even when I do, that branch will probably be unstable since its a WIP and will need to respond to changes during review.

The reason eventful traits haven't been done before is twofold:

  1. It's hard and requires a deep knowledge of traitlets to implement (which few people have).
  2. It is possible to trigger change notifications if you assign a new instance to the trait.
    • this is obviously not ideal though.

from traitlets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.