Changeset 3989
- Timestamp:
- 28 Feb 2009, 11:48:35 (16 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTables.py
r3988 r3989 33 33 import urllib 34 34 import DateTime,time 35 import csv,re 35 import csv,re,os 36 36 import logging 37 37 import Globals … … 1684 1684 if export: 1685 1685 export_file = "%s/export/course_results_removed.csv" % (i_home) 1686 file_handler = open(export_file,"a") 1687 headline = ','.join(fields) 1688 file_handler.write(headline +'\n') 1686 if not os.path.exists(export_file): 1687 file_handler = open(export_file,"a") 1688 headline = ','.join(fields) 1689 file_handler.write(headline +'\n') 1690 else: 1691 file_handler = open(export_file,"a") 1689 1692 for line in courses: 1690 1693 file_handler.write(line +'\n') … … 1813 1816 if export: 1814 1817 export_file = "%s/export/payments_removed.csv" % (i_home) 1815 file_handler = open(export_file,"a") 1816 headline = ','.join(fields) 1817 file_handler.write(headline +'\n') 1818 if not os.path.exists(export_file): 1819 file_handler = open(export_file,"a") 1820 headline = ','.join(fields) 1821 file_handler.write(headline +'\n') 1822 else: 1823 file_handler = open(export_file,"a") 1818 1824 for line in payments_dic: 1819 1825 file_handler.write(line +'\n') -
WAeUP_SRP/trunk/WAeUPTool.py
r3988 r3989 1205 1205 format = '"%(' + ')s","%('.join(fields) + ')s"' 1206 1206 export_file = "%s/export/study_levels_removed.csv" % (i_home) 1207 file_handler = open(export_file,"a") 1208 headline = ','.join(fields) 1209 file_handler.write(headline +'\n') 1207 1208 if not os.path.exists(export_file): 1209 file_handler = open(export_file,"a") 1210 headline = ','.join(fields) 1211 file_handler.write(headline +'\n') 1212 else: 1213 file_handler = open(export_file,"a") 1210 1214 1211 1215 for level in levels:
Note: See TracChangeset for help on using the changeset viewer.