Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ExternalEditor.Plugins.homesite5.EditorProcess Class Reference

List of all members.

Public Member Functions

def __init__
def wait
def isAlive

Public Attributes

 hs
 file

Detailed Description

Definition at line 23 of file homesite5.py.


Constructor & Destructor Documentation

Launch editor process

Definition at line 24 of file homesite5.py.

00024 
00025     def __init__(self, file):
00026         """Launch editor process"""
00027         hs = win32com.client.Dispatch('AllaireClientApp.TAllaireClientApp')
00028         # Try to open the file, keep retrying until we succeed or timeout
00029         i = 0
00030         timeout = 45
00031         while i < timeout:
00032             try:
00033                 hs.OpenFile(file)
00034             except:
00035                 i += 1
00036                 if i >= timeout:
00037                     raise RuntimeError('Could not launch Homesite.')
00038                 sleep(1)
00039             else:
00040                 break
00041         self.hs = hs
00042         self.file = file
        

Member Function Documentation

Returns true if the editor process is still alive

Definition at line 47 of file homesite5.py.

00047 
00048     def isAlive(self):
00049         """Returns true if the editor process is still alive"""
00050         return self.hs.IsFileOpen(self.file)

Wait for editor to exit or until timeout

Definition at line 43 of file homesite5.py.

00043 
00044     def wait(self, timeout):
00045         """Wait for editor to exit or until timeout"""
00046         sleep(timeout)
            

Member Data Documentation

Definition at line 41 of file homesite5.py.

Definition at line 40 of file homesite5.py.


The documentation for this class was generated from the following file: