def __runCommand(d): LogFile= open(os.path.join(config.appDataPath(),"activity.log"),"a") POVRayApp = os.path.join(config.POVRayPath, 'pvengine.exe').replace("\\", "/") if not os.path.isfile(POVRayApp): error_message = "Error: Could not find Pov-Ray in %s - aborting image generation" % os.path.dirname(POVRayApp) LicHelpers.writeLogEntry(error_message) print error_message return args = ['"' + POVRayApp + '"'] for key, value in d.items(): command = povCommands[key] if command: args.append(command[0] + command[1](value)) else: if key == 'inFile': args.insert(1, value) # Ensure input file is first command (after pvengine.exe itself) else: args.append(value) if config.writePOVRayActivity: LogFile.write(" ".join(args)+"\n") LogFile.close() os.spawnv(os.P_WAIT, POVRayApp, args)
def __runCommand(d): LogFile = open(os.path.join(config.appDataPath(), "activity.log"), "a") l3pApp = config.L3PPath LibDir = '-ldd%s' % config.LDrawPath if not os.path.isfile(l3pApp): error_message = "Error: Could not find L3P in %s - aborting image generation" % os.path.dirname( l3pApp) LicHelpers.writeLogEntry(error_message) print error_message return args = [l3pApp, LibDir] for key, value in d.items(): command = l3pCommands[key] if command: args.append(command[0] + command[1](value)) else: if key == 'inFile': args.insert( 1, value ) # Ensure input file is first command (after l3p.exe itself) else: args.append(value) if config.writeL3PActivity: LogFile.write(" ".join(args) + "\n") LogFile.close() os.spawnv(os.P_WAIT, l3pApp, args)
def __runCommand(d): LogFile= open(os.path.join(config.appDataPath(),"activity.log"),"a") l3pApp = os.path.join(config.L3PPath , 'l3p.exe').replace("\\", "/") LibDir = '-ldd%s' % config.LDrawPath if not os.path.isfile(l3pApp): error_message = "Error: Could not find L3P.exe in %s - aborting image generation" % os.path.dirname(l3pApp) LicHelpers.writeLogEntry(error_message) print error_message return args = [l3pApp,LibDir] for key, value in d.items(): command = l3pCommands[key] if command: args.append(command[0] + command[1](value)) else: if key == 'inFile': args.insert(1, value) # Ensure input file is first command (after l3p.exe itself) else: args.append(value) if config.writeL3PActivity: LogFile.write(" ".join(args)+"\n") LogFile.close() os.spawnv(os.P_WAIT, l3pApp, args)
def __runCommand(d): LogFile = open(os.path.join(config.appDataPath(), "activity.log"), "a") POVRayApp = config.POVRayPath if not os.path.isfile(POVRayApp): error_message = "Error: Could not find Pov-Ray in %s - aborting image generation" % os.path.dirname( POVRayApp) LicHelpers.writeLogEntry(error_message) print error_message return args = ['"' + POVRayApp + '"'] for key, value in d.items(): command = povCommands[key] if command: args.append(command[0] + command[1](value)) else: if key == 'inFile': args.insert( 1, value ) # Ensure input file is first command (after pvengine.exe itself) else: args.append(value) if config.writePOVRayActivity: LogFile.write(" ".join(args) + "\n") LogFile.close() os.spawnv(os.P_WAIT, POVRayApp, args)
def __init__(self , parent , lic_repository): MessageDlg.__init__(self, parent) self.button1.setPixmap(QCommonStyle().standardIcon (QStyle.SP_BrowserReload).pixmap(16, 16)) self.connect(self.button1, SIGNAL("clicked()"), self.init_download) self.worker = None self.location = lic_repository for key in self.fileToDownload: self.fileToPath[key] = config.partsCachePath() self.fileToPath['default_template.lit'] = config.appDataPath()