Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import os, re
  2.  
  3. dirHome = os.path.expanduser('~')
  4. nameDirPlugin = "plug-ins"
  5. l_dirPlugin = []
  6. mask = r".*gimp.[0-9]+\.[0-9]+%s%s" % ( os.sep, nameDirPlugin )
  7. for root, dirs, files in os.walk( dirHome ):
  8.   if re.match( mask, root, re.IGNORECASE):
  9.     l_dirPlugin.append( root )
  10.  
  11. print l_dirPlugin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement