Essentially, I have a python script that takes a list of filenames as system arguments:
filelist = sys.argv[1:]
I'd like the file list to be all the files in the directory that begin with a certain prefix. I thought the best way to do this is using regular expressions, but I'm not sure how to get it to work.
That is, I'd like something like
python test.py '^ex'
to yield a filelist
containing all the files in the working directory that start with "ex".