Created
July 15, 2009 00:16
-
-
Save warrickcustomhomes/147337 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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