Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a signal / slot pattern for parts ? #105

Open
scls19fr opened this issue Nov 28, 2015 · 0 comments
Open

Using a signal / slot pattern for parts ? #105

scls19fr opened this issue Nov 28, 2015 · 0 comments

Comments

@scls19fr
Copy link
Contributor

Hello,

I wonder if a signal / slot mechanism shouldn't be more "user friendly".

For example we could write:

    class MyApp(object):
        def __init__(self):
            ...
            self.switch.pressed.connect(self.do_it_when_pressed)

instead of

    class MyApp(object):
        def __init__(self):
            ...
            self.switch.set_callback_up(self.do_it_when_pressed)

Some signal / slot library are

https://pythonhosted.org/blinker/
https://github.com/circuits/circuits
https://github.com/shaunduncan/smokesignal

An other pattern to consider may be Pub / sub
http://pubsub.sourceforge.net/

This issue is related to #60

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant