2017-09-15 06:24:41 +00:00
|
|
|
"""
|
|
|
|
I am a self-contained program!
|
|
|
|
"""
|
|
|
|
|
|
|
|
import mitogen.master
|
|
|
|
|
|
|
|
|
|
|
|
def repr_stuff():
|
|
|
|
return repr([__name__, 50])
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
broker = mitogen.master.Broker()
|
|
|
|
try:
|
|
|
|
context = mitogen.master.connect(broker)
|
|
|
|
print context.call(repr_stuff)
|
|
|
|
finally:
|
|
|
|
broker.shutdown()
|
|
|
|
broker.join()
|
|
|
|
|
2017-09-16 22:52:57 +00:00
|
|
|
if __name__ == '__main__' and mitogen.master:
|
2017-09-15 06:24:41 +00:00
|
|
|
main()
|