def emboss_piped_AlignIO_convert(alignments, old_format, new_format):
 cline = SeqretCommandline(exes['seqret'], sformat=old_format, osformat=new_format, auto=True, filter=True)
 child = subprocess.Popen(str(cline), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, shell=(sys.platform != 'win32'))
 try:
  AlignIO.write(alignments, child.stdin, old_format)
 except Exception as err:
  child.stdin.close()
  child.stderr.close()
  child.stdout.close()
  raise
 child.stdin.close()
 child.stderr.close()
 try:
  aligns = list(AlignIO.parse(child.stdout, new_format))
 except Exception as err:
  child.stdout.close()
  raise
 child.stdout.close()
 return aligns

def emboss_piped_AlignIO_convert ( alignments , old_format , new_format ) : cline = SeqretCommandline ( exes [ 'seqret' ] , sformat = old_format , osformat = new_format , auto = True , filter = True ) child = subprocess . Popen ( str ( cline ) , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE , universal_newlines = True , shell = ( sys . platform != 'win32' ) ) try : AlignIO . write ( alignments , child . stdin , old_format ) except Exception as err : child . stdin . close ( ) child . stderr . close ( ) child . stdout . close ( ) raise child . stdin . close ( ) child . stderr . close ( ) try : aligns = list ( AlignIO . parse ( child . stdout , new_format ) ) except Exception as err : child . stdout . close ( ) raise child . stdout . close ( ) return aligns
run seqret .