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

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

Definition at line 29 of file photoshp.py.

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

Generated by  Doxygen 1.6.0   Back to index