Python 3.5 glob.glob() 2nd param (*) and how to detect files/folders beginning with "."?

Malcolm Greene python at bdurham.com
Tue Jul 26 12:11:43 EDT 2016


In reading Python 3.5.1's glob.glob documentation[1] I'm puzzled by the
following:
 
1. The signature for glob.glob() is "glob.glob(pathname, *,
   recursive=False)". What is the meaning of the 2nd parameter listed
   with an asterisk?
 
2. Is there a technique for using glob.glob() to recognize files and
   folders that begin with a period, eg. ".profile"? The documentation
   states: "If the directory contains files starting with . they won’t
   be matched by default.". Any suggestions on what the non-default
   approach is to match these type of files?
 
Thank you,
Malcolm
 
[1] https://docs.python.org/3/library/glob.html
 



More information about the Python-list mailing list