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

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

Definition at line 25 of file powerpnt.py.

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

Generated by  Doxygen 1.6.0   Back to index