MCPcopy Create free account
hub / github.com/ActiveState/code / CookieServer_i

Class CookieServer_i

recipes/Python/81254_Implement_CORBclient/recipe-81254.py:30–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28FORTUNE_PATH = "/usr/games/fortune"
29
30class CookieServer_i (Fortune__POA.CookieServer):
31 def get_cookie(self):
32 pipe = os.popen(FORTUNE_PATH)
33 cookie = pipe.read()
34 if pipe.close():
35 # An error occurred with the pipe
36 cookie = "Oh dear, couldn't get a fortune\n"
37 return cookie
38
39orb = CORBA.ORB_init(sys.argv)
40poa = orb.resolve_initial_references("RootPOA")

Callers 1

recipe-81254.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected