Logo Search packages:      
Sourcecode: zope-externaleditor version File versions  Download package

def ExternalEditor::Plugins::excel::EditorProcess::__init__ (   self,
  file 
)
Launch editor process

Definition at line 26 of file excel.py.

00026                             :
        """Launch editor process"""
        excel = win32com.client.Dispatch('Excel.Application')
        # Try to open the file, keep retrying until we succeed or timeout
        i = 0
        timeout = 45
        while i < timeout:
            try:
                excel.Workbooks.Open(file)
            except:
                i += 1
                if i >= timeout:
                    raise RuntimeError('Could not launch Excel.')
                sleep(1)
            else:
                break
        excel.Visible = 1
        self.excelapp = excel
        self.file = file
        

Generated by  Doxygen 1.6.0   Back to index