def cmdProcess(self):
    with open('runBatch.bat', 'w') as fd:
        fd.write('@echo off\n')
        fd.write(('cd %s\n' % self.foldName))
        fd.write(('%s\n' % self.foldName.replace('\\', '/').split('/')[0]))
        fd.write(('%s setup.py py2exe' % self.setPath))
    try:
        subprocess.call('runBatch.bat', 0, None, None, None, None)
    except:
        self.displayError(parent=self, m='Python modules were missing in the Python Interpreter\nPlease make sure you had py2exe module', t='Invalid Python Version', type=QtGui.QMessageBox.Critical)
    os.remove('runBatch.bat')
def cmdProcess(self):
    with open('runBatch.bat', 'w') as fd:
        fd.write('@echo off\n')
        fd.write(('cd %s\n' % self.foldName))
        fd.write(('%s\n' % self.foldName.replace('\\', '/').split('/')[0]))
        fd.write(('%s setup.py py2exe' % self.setPath))
    try:
        subprocess.call('runBatch.bat', 0, None, None, None, None)
    except:
        self.displayError(parent=self, m='Python modules were missing in the Python Interpreter\nPlease make sure you had py2exe module', t='Invalid Python Version', type=QtGui.QMessageBox.Critical)
    os.remove('runBatch.bat')