def get_emboss_version():
 child = subprocess.Popen(_escape_filename(exes['embossversion']), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, shell=(sys.platform != 'win32'))
 (stdout, stderr) = child.communicate()
 child.stdout.close()
 del child
 assert (stderr is None)
 for line in stdout.split('\n'):
  if (line.strip() == 'Report the current EMBOSS version number'):
   pass
  elif (line.strip() == 'Reports the current EMBOSS version number'):
   pass
  elif line.startswith('Writes the current EMBOSS version number'):
   pass
  elif (line.count('.') == 2):
   return tuple((int(v) for v in line.strip().split('.')))
  elif (line.count('.') == 3):
   return tuple((int(v) for v in line.strip().split('.')))[:3]
  else:
   raise MissingExternalDependencyError(('Install EMBOSS if you want to use Bio.Emboss (%s).' % line))
 raise MissingExternalDependencyError('Could not get EMBOSS version')

def get_emboss_version ( ) : child = subprocess . Popen ( _escape_filename ( exes [ 'embossversion' ] ) , stdout = subprocess . PIPE , stderr = subprocess . STDOUT , universal_newlines = True , shell = ( sys . platform != 'win32' ) ) ( stdout , stderr ) = child . communicate ( ) child . stdout . close ( ) del child assert ( stderr is None ) for line in stdout . split ( '\n' ) : if ( line . strip ( ) == 'Report the current EMBOSS version number' ) : pass elif ( line . strip ( ) == 'Reports the current EMBOSS version number' ) : pass elif line . startswith ( 'Writes the current EMBOSS version number' ) : pass elif ( line . count ( '.' ) == 2 ) : return tuple ( ( int ( v ) for v in line . strip ( ) . split ( '.' ) ) ) elif ( line . count ( '.' ) == 3 ) : return tuple ( ( int ( v ) for v in line . strip ( ) . split ( '.' ) ) ) [ : 3 ] else : raise MissingExternalDependencyError ( ( 'Install EMBOSS if you want to use Bio.Emboss (%s).' % line ) ) raise MissingExternalDependencyError ( 'Could not get EMBOSS version' )
returns a tuple of three ints .