def call_silently(*args, **kwargs):
 with open(os.devnull, u'w') as shutup:
  try:
   return subprocess.call(stdout=shutup, stderr=shutup, *args, **kwargs)
  except WindowsError:
   return 1

def call_silently ( * args , ** kwargs ) : with open ( os . devnull , u'w' ) as shutup : try : return subprocess . call ( stdout = shutup , stderr = shutup , * args , ** kwargs ) except WindowsError : return 1
like subprocess .