Skip to content

Using a signal / slot pattern for parts ? #105

Description

@s-celles

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions