import clacks
# -- first we create a handler / marshaller pair.
# -- as we know the server used the "simple" handler / marshaller combination on this port, we recreate its exact
# -- copy here. Otherwise, the handler will not be able to talk to the server.
handler = clacks.SimpleRequestHandler(clacks.SimplePackageMarshaller())
# -- now we can create a proxy for the "simple" server port.
proxy = clacks.ClientProxyBase(('localhost', 9998), handler=handler, connect=True)
# -- and now we can run methods on this proxy just as if we were running them directly on the server.
print(proxy.list_commands())
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter