Slide 124
Slide 124 text
Copyright (C) 2009, David Beazley, http://www.dabeaz.com
Some Sample Code
• Using the child worker
124
>>> ch.send("Hello World")
Hello World
>>> ch.send(42)
42
>>> ch.send([1,2,3,4])
[1, 2, 3, 4]
>>> ch.send({'host':'python.org','port':80})
{'host': 'python.org', 'port': 80}
>>>
This output is being
produced by the child
• You can send almost any Python object
(numbers, lists, dictionaries, instances, etc.)