def _get_tl_gs_path(texpath):
 pdflatex = which('pdflatex', path=texpath)
 if (pdflatex is None):
  return None
 tlgs_path = os.path.normpath(os.path.join(os.path.dirname(pdflatex), '..', '..', 'tlpkg', 'tlgs', 'bin'))
 return (which('gswin32c', path=tlgs_path) or which('gswin64c', path=tlgs_path))

def _get_tl_gs_path ( texpath ) : pdflatex = which ( 'pdflatex' , path = texpath ) if ( pdflatex is None ) : return None tlgs_path = os . path . normpath ( os . path . join ( os . path . dirname ( pdflatex ) , '..' , '..' , 'tlpkg' , 'tlgs' , 'bin' ) ) return ( which ( 'gswin32c' , path = tlgs_path ) or which ( 'gswin64c' , path = tlgs_path ) )
tries to find the gs installed by texlive .