Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #2739
| From | Hartmut Goebel <h.goebel@crazy-compilers.com> |
|---|---|
| Newsgroups | comp.lang.python.announce |
| Subject | [ANN] python-ghostscript 0.6 |
| Date | 2018-01-16 23:40 +0100 |
| Organization | crazy-compilers.com |
| Message-ID | <mailman.103.1516203038.2620.python-announce-list@python.org> (permalink) |
| References | <45d9ca3d-d24e-b17e-71e4-cc4945f2b1db@crazy-compilers.com> |
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 comp.lang.python.announce | Previous | Next | Find similar | Unroll thread
[ANN] python-ghostscript 0.6 Hartmut Goebel <h.goebel@crazy-compilers.com> - 2018-01-16 23:40 +0100
csiph-web