X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=contrib%2Fmfp_igor_scripts%2FFMjoin.py;h=615a957a02be91cf300c9babbe680a8b1a966b70;hp=73a9ec56abea5315290b23b2b1ea43533957a41d;hb=60b12a779acf92ec32ef2d0ed9e5766b11705150;hpb=01c8dd10d343718246c48dc2f4c122d59913de4d diff --git a/contrib/mfp_igor_scripts/FMjoin.py b/contrib/mfp_igor_scripts/FMjoin.py index 73a9ec5..615a957 100644 --- a/contrib/mfp_igor_scripts/FMjoin.py +++ b/contrib/mfp_igor_scripts/FMjoin.py @@ -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