Announcing: python-ghostscript 0.3

Peter Kleiweg p.c.j.kleiweg at rug.nl
Thu Aug 12 11:36:38 EDT 2010


Hartmut Goebel schreef op de 12e dag van de oogstmaand van het jaar 2010:

> Here is an example for how to use the high-level interface of
> `python-ghostscript`. This implements a very basic ps2pdf-tool::
> 
>   import sys
>   import ghostscript
> 
>   args = [
>       "ps2pdf",	# actual value doesn't matter
>       "-dNOPAUSE", "-dBATCH", "-dSAFER",
>       "-sDEVICE=pdfwrite",
>       "-sOutputFile=" + sys.argv[1],
>       "-c", ".setpdfwrite",
>       "-f",  sys.argv[2]
>       ]
> 
>   ghostscript.Ghostscript(*args)

How is this different from os.system(' '.join(args)) ?



-- 
Peter Kleiweg  L:NL,af,da,de,en,ia,nds,no,sv,(fr,it)  S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/kleiweg/ls.html



More information about the Python-list mailing list