Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #2739 > unrolled thread
| Started by | Hartmut Goebel <h.goebel@crazy-compilers.com> |
|---|---|
| First post | 2018-01-16 23:40 +0100 |
| Last post | 2018-01-16 23:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python.announce
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[ANN] python-ghostscript 0.6 Hartmut Goebel <h.goebel@crazy-compilers.com> - 2018-01-16 23:40 +0100
| From | Hartmut Goebel <h.goebel@crazy-compilers.com> |
|---|---|
| Date | 2018-01-16 23:40 +0100 |
| Subject | [ANN] python-ghostscript 0.6 |
| Message-ID | <mailman.103.1516203038.2620.python-announce-list@python.org> |
I'm pleased to announce the new release vor python-ghostscript: python-ghostscript 0.6 A Python-Interface to the Ghostscript C-API using ctypes :License: GNU Public License v3 (GPLv3) :Author: Hartmut Goebel <h.goebel@crazy-compiler.com> :Homepage: https://gitlab.com/pdftools/python-ghostscript :Download: https://pypi.python.org/pypi/ghostscript `Ghostscript`__, is a well known interpreter for the PostScript language and for PDF. This package implements a interface to the Ghostscript C-API using `ctypes`__. Both a low-level and a pythonic, high-level interface are provided. __ http://www.ghostscript.com/ __ http://docs.python.org/library/ctypes.html This package is currently tested only under GNU/Linux. Please report whether it works in your environment, too. Thanks. Latest Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please note: Version 0.5 has been skipped to avoid version conflicts with the fork `python3-ghostscript`. All changes of that fork are integrated into this release. * Add support for Python 3.x (tested with Python 3.4). Minimum required Python version is now 2.7. * Add support for display callback and an example program using it. Thanks to Lasse Fister. * Add context-interface (for the ``with``-statement). * ``GhostscriptError`` now has an attribute ``code`` holding the numeric error-code. * ``Ghostscript()`` now accepts keyword-arguments ``stdin``, ``stdout``, ``stderr`` for setting the respective stream. This was already implementd in version 0.4.1, but not documented. * Add unittest suite (using pytest). * Several bug fixes and smaller changes. * Switch version control to git and move project to gitlab. See Readme-file for the new URL. * Set up continuous integration tests. Example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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) -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
Back to top | Article view | comp.lang.python.announce
csiph-web