cmd = 'find . -type f -iname "*foo*" ! -name ".*"'
sp = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=
    subprocess.PIPE)
print(sp.communicate()[0].split())
Python - execute find with multiple conditions using Popen