You can use argparse to create an option parser that accepts a file path and opens it.
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('infile', type='open')
args = parser.parse_args()
for line in args.infile:
print line
if __name__ == '__main__':
main()