diff --git a/src/menu/scripts/AE_render/exec.py b/src/menu/scripts/AE_render/exec.py index 32821ad..aa9b44f 100644 --- a/src/menu/scripts/AE_render/exec.py +++ b/src/menu/scripts/AE_render/exec.py @@ -1,9 +1,8 @@ - +import os +import sys +import subprocess def main(script,myDir,mySel,aerenderExec,compName,startf,endf,incrementf,RStemplate,OMtemplate,outName,outDir,reuse) : - import subprocess - #print script,myDir,mySel,aerenderExec,compName,startf,endf,outName,outDir - #start creating the arguments args = [aerenderExec,'-project',mySel] @@ -30,15 +29,13 @@ def main(script,myDir,mySel,aerenderExec,compName,startf,endf,incrementf,RStempl if (reuse == 'true'): args.extend(['-reuse']) + print (args) #execute the args subprocess.Popen(args) if __name__ == '__main__': - import os - import sys - import re - + print (*sys.argv) main(*sys.argv) """ diff --git a/src/menu/scripts/composite/exec.py b/src/menu/scripts/composite/exec.py index da751c5..93bffb8 100644 --- a/src/menu/scripts/composite/exec.py +++ b/src/menu/scripts/composite/exec.py @@ -1,4 +1,4 @@ -#python 2.7 +#python 3.6 #Script to create a project based on a given template import os @@ -34,7 +34,7 @@ def main(script,myDir,mySel,magickExec,composeType,background,scale,size,quality outFile = '{0}.{1}'.format(outName,outFormat) else: outFile = pre + '_{0}.{1}'.format(composeType,outFormat) - print outFile + print (outFile) args.extend(['-compose',composeType]) @@ -59,14 +59,14 @@ def main(script,myDir,mySel,magickExec,composeType,background,scale,size,quality outRender = os.path.join(myDir,outFile) args.extend(["-composite",outRender]) - print args + print (args) #execute the args subprocess.Popen(args) if __name__ == '__main__': - print sys.argv + print (sys.argv) main(*sys.argv) """ diff --git a/src/menu/scripts/imageConvert/exec.py b/src/menu/scripts/imageConvert/exec.py index e70ed88..3637159 100644 --- a/src/menu/scripts/imageConvert/exec.py +++ b/src/menu/scripts/imageConvert/exec.py @@ -48,7 +48,7 @@ def main(script,myDir,mySel,magickExec,background,scale,size,myFormat,quality,ou outRender = os.path.join(myDir,outFile) args.extend([outRender]) - print args + print (args) #execute the args subprocess.Popen(args) @@ -56,7 +56,7 @@ def main(script,myDir,mySel,magickExec,background,scale,size,myFormat,quality,ou if __name__ == '__main__': - print sys.argv + print (sys.argv) main(*sys.argv) """ try: diff --git a/src/menu/scripts/mayaRender/exec.py b/src/menu/scripts/mayaRender/exec.py index 9785d1e..96504d3 100644 --- a/src/menu/scripts/mayaRender/exec.py +++ b/src/menu/scripts/mayaRender/exec.py @@ -1,10 +1,9 @@ - +import subprocess +import os +import sys +import re def main(script,myDir,mySel,renderExec,renderer,proj,cam,fStart,fEnd,byFrame,xRes,yRes,resPerc,fFormat,outName,outDir) : - import subprocess - #print script,myDir,mySel,aerenderExec,compName,startf,endf,outName,outDir - print myDir,mySel,renderExec,renderer,proj,cam,fStart,fEnd,byFrame,xRes,yRes,resPerc,fFormat,outName,outDir - #start creating the arguments list args = [] #resolving the magick executable @@ -41,7 +40,7 @@ def main(script,myDir,mySel,renderExec,renderer,proj,cam,fStart,fEnd,byFrame,xRe #append the file path args.extend([mySel]) - print args + print (args) #execute the args subprocess.Popen(args) @@ -49,11 +48,9 @@ def main(script,myDir,mySel,renderExec,renderer,proj,cam,fStart,fEnd,byFrame,xRe if __name__ == '__main__': - import os - import sys - import re + print (*sys.argv) main(*sys.argv) - + """ try: main(*sys.argv) diff --git a/src/menu/scripts/packImages/exec.py b/src/menu/scripts/packImages/exec.py index e114e5a..b717746 100644 --- a/src/menu/scripts/packImages/exec.py +++ b/src/menu/scripts/packImages/exec.py @@ -32,7 +32,7 @@ def main(script,myDir,mySel,magickExec,background,quality,tiles,margin,maxSize,d if DisplaySize == "true": label.append("\\n%wx%h") if len(label) != 0: - print ''.join(label) + print (''.join(label)) args.extend(["-label",''.join(label)]) args.extend([myFile]) @@ -78,13 +78,13 @@ def main(script,myDir,mySel,magickExec,background,quality,tiles,margin,maxSize,d outRender = os.path.join(myDir,outFile) args.extend([outRender]) - print args + print (args) #execute the args #subprocess.Popen(args) p = Popen(args, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT) output = p.stdout.read() - print output + print (output) return output diff --git a/src/menu/scripts/screenshot_loop/exec.py b/src/menu/scripts/screenshot_loop/exec.py index d18e0a9..08f1318 100644 --- a/src/menu/scripts/screenshot_loop/exec.py +++ b/src/menu/scripts/screenshot_loop/exec.py @@ -9,7 +9,7 @@ def main(script,monitor,screens,interval,outName,incTime,incDate,outDir,myFormat magickPath = os.path.join(scriptDir,'..','..','libs','magick.exe') magickPath = os.path.realpath(magickPath) monitorScr = "screenshot:[{}]".format(monitor) - + i = 0 while i < int(screens) : @@ -22,11 +22,11 @@ def main(script,monitor,screens,interval,outName,incTime,incDate,outDir,myFormat if incTime != "false": currentTime = time.strftime("%H_%M_%S", time.gmtime()) currentName.append("-{}".format(currentTime)) - print currentTime + print (currentTime) if incDate != "false": currentDate = time.strftime("%Y_%m_%d", time.gmtime()) currentName.append("-{}".format(currentDate)) - print currentDate + print (currentDate) #finalizing file name construction currentName.append(".{}".format(myFormat)) @@ -35,21 +35,21 @@ def main(script,monitor,screens,interval,outName,incTime,incDate,outDir,myFormat args.extend([outputScr]) - print args + print (args) subprocess.Popen(args) #incrementing the number of repetitions i = i + 1 #sleep and till the next interval time.sleep(float(interval)) - + if __name__ == '__main__': - print sys.argv + print (sys.argv) main(*sys.argv) """ try: @@ -62,4 +62,4 @@ def main(script,monitor,screens,interval,outName,incTime,incDate,outDir,myFormat print traceback.format_exc() print "Press Enter to continue ..." raw_input("Press ENTER to exit") - """ \ No newline at end of file + """ diff --git a/src/menu/scripts/searchAndReplace/exec.py b/src/menu/scripts/searchAndReplace/exec.py index cda79e9..0701c3a 100644 --- a/src/menu/scripts/searchAndReplace/exec.py +++ b/src/menu/scripts/searchAndReplace/exec.py @@ -1,3 +1,8 @@ +#python 3.6 + +import os +import sys + def main(script,mySel,mySearch,myReplace) : print (mySel,mySearch,myReplace) mySel = open(mySel,"r") @@ -9,11 +14,10 @@ def main(script,mySel,mySearch,myReplace) : newBasename = myBaseName.replace(mySearch, myReplace) newFileName = os.path.join(myDirname,newBasename) os.rename(fileName,newFileName) - print "{0} ===> {1}".format(myBaseName,newBasename) + print ("{0} ===> {1}".format(myBaseName,newBasename)) if __name__ == '__main__': - import os - import sys - main(*sys.argv) \ No newline at end of file + + main(*sys.argv) diff --git a/src/menu/scripts/sequenceToMp4/exec.py b/src/menu/scripts/sequenceToMp4/exec.py index 33f7629..9caf6f0 100644 --- a/src/menu/scripts/sequenceToMp4/exec.py +++ b/src/menu/scripts/sequenceToMp4/exec.py @@ -1,5 +1,5 @@ def convertSelected(ffmpegExec,inputPattern,outputPattern,frameRate,scale,crf,trc,startFrame,totalFrames,myAudio) : - print "converting Selected only..." + print ("converting Selected only...") args = [] if ffmpegExec != 'None': args.extend([ffmpegExec]) @@ -31,12 +31,12 @@ def convertSelected(ffmpegExec,inputPattern,outputPattern,frameRate,scale,crf,tr args.extend(['-start_number',startFrame]) if totalFrames != 'None': - print totalFrames + print (totalFrames) args.extend(['-vframes {}'.format(11)]) args.extend(['-vcodec','libx264','-pix_fmt','yuv420p',outputPattern]) - print args + print (args) #execute the args subprocess.Popen(args) @@ -90,10 +90,10 @@ def main(script,myDir,mySel,ffmpegExec,frameRate,scale,trc,crf,myAudio,outDir) : #switch extention to mp4 for out put pattern if outDir == 'None': outputPattern = p.search(imageList[0]).group(1) + '.mp4' - print outputPattern + print (outputPattern) else : outputPattern = outDir + '\\' + os.path.basename(p.search(imageList[0]).group(1) + '.mp4') - print outputPattern + print (outputPattern) convertSequence(ffmpegExec,inputPattern,outputPattern,frameRate,scale,crf,trc,myAudio) """ @@ -126,4 +126,4 @@ def main(script,myDir,mySel,ffmpegExec,frameRate,scale,trc,crf,myAudio,outDir) : print >> sys.stderr, traceback.print_exc() print "Press Enter to continue ..." raw_input("Press ENTER to exit") - """ \ No newline at end of file + """ diff --git a/src/menu/scripts/solidColor/exec.py b/src/menu/scripts/solidColor/exec.py index 8978ee8..c6021e7 100644 --- a/src/menu/scripts/solidColor/exec.py +++ b/src/menu/scripts/solidColor/exec.py @@ -52,7 +52,7 @@ def main(script, myDir, mySel, magickExec, myColor,selectedSize, size, fileForma outRender = os.path.join(myDir, outFile) args.extend([outRender]) - print args + print (args) # execute the args subprocess.Popen(args) @@ -61,9 +61,9 @@ def main(script, myDir, mySel, magickExec, myColor,selectedSize, size, fileForma import os import sys import re - print sys.argv + print (sys.argv) main(*sys.argv) - + """ try: main(*sys.argv) @@ -76,4 +76,3 @@ def main(script, myDir, mySel, magickExec, myColor,selectedSize, size, fileForma print "Press Enter to continue ..." raw_input("Press ENTER to exit") """ -