NoteMe
Feb 27th, 2006, 10:31 AM
def read_all_files():
global files_and_lines
for files in constants.FILE_NAMES:
fpath = os.path.join((sys.path[0]),"lexi", files)
try:
lexi_file = open(fpath, "r")
constants.files_and_lines.append(lexi_file.readlines())
except(IOError):
print "Something went wrong trying to read the file:"
print "'%s'" % fpath
lexi_file.close()
global files_and_lines
for files in constants.FILE_NAMES:
fpath = os.path.join((sys.path[0]),"lexi", files)
try:
lexi_file = open(fpath, "r")
constants.files_and_lines.append(lexi_file.readlines())
except(IOError):
print "Something went wrong trying to read the file:"
print "'%s'" % fpath
lexi_file.close()