I have a function that reads a given file as an argument, I would like to make a script.
Here what I done :
import sys
def read_list_from_file(filename):
with open(filename) as fobj :
lines = fobj.read().splitlines()
return lines
filenames = sys.argv[0]
if len(filenames) > 1 : read_list_from_file(filenames)
But nothing happens