Peach :: Publishers :: com :: Com :: Class Com
[hide private]

Class Com

source code


Very simple Com publisher that allows for a single method call. The method call is fed in as a string which is evaled. This allows for calling any method with any number of parameters.

Instance Methods [hide private]
 
__init__(self, clsid)
Create Com Object.
source code
 
start(self)
Change state such that send/receave will work.
source code
 
stop(self)
Change state such that send/receave will not work.
source code
string
call(self, method, args)
Call method on COM object.
source code
 
property(self, property, value=None)
Get or set property
source code

Inherited from publisher.Publisher: accept, close, receive, send

Class Variables [hide private]
  _clsid = None
  _methodFormat = None
  _lastReturn = None
  _object = None
Method Details [hide private]

__init__(self, clsid)
(Constructor)

source code 

Create Com Object. clsid = '{...}'

Parameters:
  • clsid (string) - CLSID of COM object in {...} format

start(self)

source code 

Change state such that send/receave will work. For Tcp this could be connecting to a remote host

Overrides: publisher.Publisher.start
(inherited documentation)

stop(self)

source code 

Change state such that send/receave will not work. For Tcp this could be closing a connection, for a file it might be closing the file handle.

Overrides: publisher.Publisher.stop
(inherited documentation)

call(self, method, args)

source code 

Call method on COM object.

Parameters:
  • method (string) - Name of method to invoke
  • args (array of objects) - Arguments to pass
Returns: string
data returned (if any)
Overrides: publisher.Publisher.call

property(self, property, value=None)

source code 

Get or set property

Parameters:
  • property (string) - Name of method to invoke
  • value (object) - Value to set. If None, return property instead
Overrides: publisher.Publisher.property