Professional Documents
Culture Documents
/usr/bin/env python
############################################################################
# Author Name: Seth Cram
# Date: 12/16/2021
# File: ReverseContents.py
# Goal:
# Write a script to reverse the contents of a text file.
#
# Project Description:
# -This script needs to be run with a file name
# -File I/O is used to replace the changed file
#
# Clarifications:
# -Also have to reverse ordering of words
# -Assumed reversal meant reverse letters and ordering of each word
# -Preserves file formatting
#
# Possible Expansion:
# -Could pass in more than one file at a time or a directory
#
############################################################################
#reverse lines of f:
def revFile( f ):
'Reverses file contents'
return lines
#MAIN CODE
#error codes:
TOO_SHORT = 1
OPTION_ERR = 2
f.close()
f.close()