lib/matplotlib/backends/backend_ps.py
def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None):
    """
    Use ghostscript's pswrite or epswrite device to distill a file.
    This yields smaller files without illegal encapsulated postscript
    operators. The output is low-level, converting text to outlines.
    """
    paper = '-sPAPERSIZE=%s'% ptype
    psfile = tmpfile + '.ps'
    outfile = tmpfile + '.output'
    dpi = rcParams['ps.distiller.res']
    if sys.platform == 'win32': gs_exe = 'gswin32c'
    else: gs_exe = 'gs'
    command = '%s -dBATCH -dNOPAUSE -r%d -sDEVICE=pswrite %s -sOutputFile="%s" \
                "%s" > "%s"'% (gs_exe, dpi, paper, psfile, tmpfile, outfile)
    verbose.report(command, 'debug')
    exit_status = os.system(command)
    fh = file(outfile)
    if exit_status: raise RuntimeError('ghostscript was not able to process \
your image.\nHere is the full report generated by ghostscript:\n\n' + fh.read())
    else: verbose.report(fh.read(), 'debug')
    fh.close()
    os.remove(outfile)
    os.remove(tmpfile)
    shutil.move(psfile, tmpfile)



    # Since the the paper size is set to the figure size for eps
    # output (in '_print_figure_tex'), pstoeps call is not required.

    #if eps:
    #    pstoeps(tmpfile, bbox)

    Use ghostscript's pswrite or epswrite device to distill a file.
    This yields smaller files without illegal encapsulated postscript
    operators. The output is low-level, converting text to outlines.
    
Use ghostscript's pswrite or epswrite device to distill a file.
This yields smaller files without illegal encapsulated postscript
operators. The output is low-level, converting text to outlines.
Use ghostscript ' s pswrite or epswrite device to distill a file . This yields smaller files without illegal encapsulated postscript operators . The output is low - level converting text to outlines .
def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None):
    paper = '-sPAPERSIZE=%s'% ptype
    psfile = tmpfile + '.ps'
    outfile = tmpfile + '.output'
    dpi = rcParams['ps.distiller.res']
    if sys.platform == 'win32': gs_exe = 'gswin32c'
    else: gs_exe = 'gs'
    command = '%s -dBATCH -dNOPAUSE -r%d -sDEVICE=pswrite %s -sOutputFile="%s" \
                "%s" > "%s"'% (gs_exe, dpi, paper, psfile, tmpfile, outfile)
    verbose.report(command, 'debug')
    exit_status = os.system(command)
    fh = file(outfile)
    if exit_status: raise RuntimeError('ghostscript was not able to process \
your image.\nHere is the full report generated by ghostscript:\n\n' + fh.read())
    else: verbose.report(fh.read(), 'debug')
    fh.close()
    os.remove(outfile)
    os.remove(tmpfile)
    shutil.move(psfile, tmpfile)
def gs_distill ( tmpfile , eps = False , ptype = 'letter' , bbox = None ) : paper = '-sPAPERSIZE=%s' % ptype psfile = tmpfile + '.ps' outfile = tmpfile + '.output' dpi = rcParams [ 'ps.distiller.res' ] if sys . platform == 'win32' : gs_exe = 'gswin32c' else : gs_exe = 'gs' command = '%s -dBATCH -dNOPAUSE -r%d -sDEVICE=pswrite %s -sOutputFile="%s" \
                "%s" > "%s"' % ( gs_exe , dpi , paper , psfile , tmpfile , outfile ) verbose . report ( command , 'debug' ) exit_status = os . system ( command ) fh = file ( outfile ) if exit_status : raise RuntimeError ( 'ghostscript was not able to process \
your image.\nHere is the full report generated by ghostscript:\n\n' + fh . read ( ) ) else : verbose . report ( fh . read ( ) , 'debug' ) fh . close ( ) os . remove ( outfile ) os . remove ( tmpfile ) shutil . move ( psfile , tmpfile )
Use ghostscript's pswrite or epswrite device to distill a file.
Use ghostscript ' s pswrite or epswrite device to distill a file .
"""
    Use ghostscript's pswrite or epswrite device to distill a file.
    This yields smaller files without illegal encapsulated postscript
    operators. The output is low-level, converting text to outlines.
    """ # Since the the paper size is set to the figure size for eps # output (in '_print_figure_tex'), pstoeps call is not required. #if eps: #    pstoeps(tmpfile, bbox)
tmpfile
eps
ptype
bbox