I am trying to output a file's contents to terminal using the File.read() function in Python, but keep receiving the following output which doesn't match my ".txt" file contents.
Python Code
from sys import argv
script, input_file = argv
def print_all(f):
print f.read
current_file = open(input_file)
print "Print File contents:\n"
print_all(current_file)
current_file.close()
Output:
Print File contents:
<built-in method read of file object at 0x1004bd470>