809 try: |
809 try: |
810 pf = open(outFile, "w", encoding="utf-8") |
810 pf = open(outFile, "w", encoding="utf-8") |
811 for key, fileList in sections: |
811 for key, fileList in sections: |
812 if len(fileList) > 0: |
812 if len(fileList) > 0: |
813 pf.write('{0} = '.format(key)) |
813 pf.write('{0} = '.format(key)) |
814 last = len(fileList) - 1 |
814 pf.write(' \\\n\t'.join( |
815 if last > 0: |
815 [f.replace(os.sep, '/') for f in fileList])) |
816 pf.write('{0} \\{1}'.format( |
816 pf.write('\n\n') |
817 fileList[0].replace(os.sep, '/'), "\n")) |
817 |
818 for i in range(1, last): |
|
819 pf.write('\t{0} \\{1}'.format( |
|
820 fileList[i].replace(os.sep, '/'), "\n")) |
|
821 pf.write('\t{0} {1}{2}'.format( |
|
822 fileList[last].replace(os.sep, '/'), |
|
823 "\n", "\n")) |
|
824 else: |
|
825 pf.write('{0} {1}{2}'.format( |
|
826 fileList[0].replace(os.sep, '/'), "\n", "\n")) |
|
827 |
|
828 pf.close() |
818 pf.close() |
829 self.__tmpProjects.append(outFile) |
819 self.__tmpProjects.append(outFile) |
830 except IOError: |
820 except IOError: |
831 E5MessageBox.critical( |
821 E5MessageBox.critical( |
832 self, |
822 self, |