I want to create a new list in Python from filenames in a user defined directory .
I can't quite get my head around the subprocess syntax from the wiki and some of the commands using PIPE seem to be discouraged.
So I'd prompt to define which directory to load from:
directory = raw_input("Path to directory: ")
Then run subprocess.check_output(["ls", "*eg*.txt"])
in the specified directory and place the output into list1
.