Skip to content

Instantly share code, notes, and snippets.

@warrickcustomhomes
Created July 15, 2009 00:16
Show Gist options
  • Save warrickcustomhomes/147337 to your computer and use it in GitHub Desktop.
Save warrickcustomhomes/147337 to your computer and use it in GitHub Desktop.
### RPC Server Implementation File ###
import interface
import app_pb2
class ApplicationServiceImpl(app_pb2.ApplicationService):
def __init__(self):
self.interface = interface.ApplicationInterface()
def CreateSystem(self, controller, request, done):
interface.save_case('C:\\test.txt');
response = app_pb2.Error()
response.error = False
done.run(response)
### Windows Application Python Wrapper File ###
import app_pb2
import win32com
class ApplicationInterface():
def __init__(self):
self.app = win32com.client.Dispatch('Foo.Bar')
def save_case(self,file):
self.app.RunScriptCommand('SaveCase("%s")' % file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment