You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/data/self_contained_program.py

23 lines
388 B
Python

"""
I am a self-contained program!
"""
import econtext.master
def repr_stuff():
return repr([__name__, 50])
def main():
broker = econtext.master.Broker()
try:
context = econtext.master.connect(broker)
print context.call(repr_stuff)
finally:
broker.shutdown()
broker.join()
if __name__ == '__main__' and not econtext.slave:
main()