Skip to content

Instantly share code, notes, and snippets.

@m-x-k
Created January 23, 2017 21:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save m-x-k/d2fef9cfc527a9b5156a773ea5059295 to your computer and use it in GitHub Desktop.
Save m-x-k/d2fef9cfc527a9b5156a773ea5059295 to your computer and use it in GitHub Desktop.
Reactive (Rx) python example with intervals
from rx import Observable, Observer
Observable.interval(1000) \
.map(lambda i: "{0} Mississippi".format(i))\
.subscribe(lambda s: print(s))
input("Press any key to quit")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment