I have been playing around with python lately and have built a python file that reads from files in a specific directory. The specific file it will read is passed in from the command line:
import sys
DIR = /path/to/files
with open(DIR + sys.argv[1]) as fil:
print(fil.readlines())
# python testPy.py fileName
# >>> prints contents of file
I am curious if there is a way I can tab complete the names of the files in DIR