This post is a continuation of the post Python : Basics of File Handling
The below program prompts user to enter the full path of a file to be read, and prints each line one at a time, inserting a line of asterisks between each line.
=== ===== ===
print(“You have entered theFile function”)
fileSelection = raw_input(“Enter the file location :”)
print(“The file you have selected is : ” + str(fileSelection))
theFile = open(fileSelection)
theFileLines = theFile.readline()