def subprocess_call(cmd, verbose=True, errorprint=True):
 verbose_print(verbose, ('\n[MoviePy] Running:\n>>> ' + ' '.join(cmd)))
 popen_params = {'stdout': DEVNULL, 'stderr': sp.PIPE, 'stdin': DEVNULL}
 if (os.name == 'nt'):
  popen_params['creationflags'] = 134217728
 proc = sp.Popen(cmd, **popen_params)
 (out, err) = proc.communicate()
 proc.stderr.close()
 if proc.returncode:
  verbose_print(errorprint, '\n[MoviePy] This command returned an error !')
  raise IOError(err.decode('utf8'))
 else:
  verbose_print(verbose, '\n... command successful.\n')
 del proc

def subprocess_call ( cmd , verbose = True , errorprint = True ) : verbose_print ( verbose , ( '\n[MoviePy] Running:\n>>> ' + ' ' . join ( cmd ) ) ) popen_params = { 'stdout' : DEVNULL , 'stderr' : sp . PIPE , 'stdin' : DEVNULL } if ( os . name == 'nt' ) : popen_params [ 'creationflags' ] = 134217728 proc = sp . Popen ( cmd , ** popen_params ) ( out , err ) = proc . communicate ( ) proc . stderr . close ( ) if proc . returncode : verbose_print ( errorprint , '\n[MoviePy] This command returned an error !' ) raise IOError ( err . decode ( 'utf8' ) ) else : verbose_print ( verbose , '\n... command successful.\n' ) del proc
executes the given subprocess command .