Convert from "print ..." to "print(...)"
[hooke.git] / contrib / mfp_igor_scripts / FMjoin.py
index 73a9ec56abea5315290b23b2b1ea43533957a41d..615a957a02be91cf300c9babbe680a8b1a966b70 100644 (file)
@@ -30,7 +30,8 @@ import sys
 
 def main(*args):
        if len(sys.argv) < 2:
-               print 'You must at least specify origin and destination folders.'
+               print('You must at least specify origin and destination '
+                     'folders.')
                return 0
        origin=sys.argv[1]
        dest=sys.argv[2]
@@ -38,13 +39,15 @@ def main(*args):
        if os.path.exists(origin):
                if os.path.exists(dest):
                        if os.listdir(dest)!=[]:
-                               print 'Destination folder is not empty! Use another folder.'
+                               print('Destination folder is not empty! Use '
+                                     'another folder.')
                                return 0
                else:
-                       print 'Destination folder does not exist, will create it'
+                       print('Destination folder does not exist, will create '
+                             'it')
                        os.mkdir(dest)
        else:
-               print 'You provided a wrong origin folder name, try again.'
+               print('You provided a wrong origin folder name, try again.')
        
        origin=os.path.abspath(origin)
        dest=os.path.abspath(dest)
@@ -59,7 +62,7 @@ def main(*args):
                        rawdest=rawdest.replace('/','') #for linux
                        rawdest=rawdest.replace('\\','') #for windows
                        destfile=os.path.join(dest,rawdest)
-                       print 'Copying '+rawdest
+                       print('Copying '+rawdest)
                        shutil.copy(filepath,destfile)
     
         return 0