I had to do something similar quite a while ago. You could use Python's glob module for gathering all the pathnames that match user's input pattern; and readline module to facilitate the autocompletion.
Here's a handy gist with an example implementation:
Hope this helps! :)