<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 This is the demo that I used during the EuroScipy 2015 talk on Flexx.
flexx.webruntime
Launch a web runtime. Can be a browser or something that looks like a desktop app.
Step1:  flexx.pyscript
Step2:  flexx.react
Reactive programming uses signals to communicate between different components of an app, and provides easy ways to react to changes in the values of these signals.
The API for flexx.react consists of a few decorators to turn functions into signals. One signal is the input signal.
Step3:  A signal can have multiple upstream signals.
Step4:  Dynamism provides great flexibility
Step5:  flexx.app
<ASSISTANT_TASK:>
Python Code:
from flexx.webruntime import launch
rt = launch('http://flexx.rtfd.org', 'xul', title='Test title')
Explanation: This is the demo that I used during the EuroScipy 2015 talk on Flexx.
flexx.webruntime
Launch a web runtime. Can be a browser or something that looks like a desktop app.
End of explanation
from flexx.pyscript import py2js
print(py2js('square = lambda x: x**2'))
def foo(n):
    res = []
    for i in range(n):
        res.append(i**2)
    return res
print(py2js(foo))
def foo(n):
    return [i**2 for i in range(n)]
print(py2js(foo))
Explanation: flexx.pyscript
End of explanation
from flexx import react
@react.input
def name(n='john doe'):
    if not isinstance(n, str):
        raise ValueError('Name must be a string')
    return n.capitalize()
name
@react.connect('name')
def greet(n):
    print('hello %s' % n)
name("almar klein")
Explanation: flexx.react
Reactive programming uses signals to communicate between different components of an app, and provides easy ways to react to changes in the values of these signals.
The API for flexx.react consists of a few decorators to turn functions into signals. One signal is the input signal.
End of explanation
@react.connect('first_name', 'last_name')
def greet(first, last):
    print('hello %s %s!' % (first, last))
Explanation: A signal can have multiple upstream signals.
End of explanation
class Person(react.HasSignals):
    
    @react.input
    def father(f):
        assert isinstance(f, Person)
        return f
    @react.connect('father.last_name')
    def last_name(s):
        return s
    
    @react.connect('children.*.name')
    def child_names(*names):
        return ', '.join(name)
Explanation: Dynamism provides great flexibility
End of explanation
from flexx import app, react
app.init_notebook()
class Greeter(app.Pair):
    
    @react.input
    def name(s):
        return str(s)
    
    class JS:
        
        @react.connect('name')
        def _greet(name):
            alert('Hello %s!' % name)
greeter = Greeter()
greeter.name('John')
Explanation: flexx.app
End of explanation
<END_TASK>