Issue
Using Python, how does one parse/access files with Linux-specific features, like "~/.mozilla/firefox/*.default"
? I've tried this, but it doesn't work.
Thanks
Solution
This
import glob, os
glob.glob(os.path.expanduser('~/.mozilla/firefox/*.default'))
will give you a list of all files ending in ".default" in the current user's ~/.mozilla/firefox
directory using os.path.expanduser to expand the ~
in the path and glob.glob to match the *.default
file pattern.
Answered By - Will McCutchen Answer Checked By - Timothy Miller (WPSolving Admin)