X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-announce@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:ANN': 0.02; 'sys': 0.04; 'high-level': 0.05; 'implements': 0.05; 'interpreter': 0.05; 'skip:` 10': 0.05; 'args': 0.07; 'url:pypi': 0.08; 'bug:': 0.09; 'ctypes': 0.09; 'url:bitbucket': 0.09; 'wrappers': 0.09; 'win32': 0.12; 'subject:python': 0.15; '"-c",': 0.16; '(unix)': 0.16; '0.4': 0.16; ':homepage:': 0.16; 'c-api': 0.16; 'compilers': 0.16; 'gnu/linux.': 0.16; 'low-level': 0.16; 'received:eu': 0.16; 'registry;': 0.16; 'typo': 0.16; 'subject:] ': 0.17; 'handles': 0.19; 'interface': 0.20; 'examples': 0.22; 'skip:` 20': 0.23; 'fixed': 0.23; 'version': 0.24; 'language': 0.26; 'changes': 0.26; 'function': 0.27; 'url:library': 0.28; 'gnu': 0.28; 'provided.': 0.28; 'testing': 0.28; 'example': 0.29; 'import': 0.31; 'load': 0.31; "doesn't": 0.32; 'header:X-Complaints-To:1': 0.32; 'thanks.': 0.32; 'skip:" 20': 0.33; 'under': 0.33; 'file': 0.34; 'whether': 0.34; 'header:User-Agent:1': 0.34; 'using': 0.35; 'skip:" 10': 0.35; 'url:docs': 0.35; 'report': 0.36; 'basic': 0.37; 'subject:[': 0.37; 'known': 0.37; 'works': 0.38; 'url:org': 0.38; 'actual': 0.39; 'url:python': 0.39; 'your': 0.61; 'name': 0.61; 'to:addr:comp-lang-python-announce': 0.63; 'here': 0.64; 'plus': 0.65; 'existence': 0.67; 'received:151': 0.67; 'to:addr:moderators.isc.org': 0.76; 'received:151.189': 0.84; 'received:178': 0.84; 'skip:~ 30': 0.84; 'pdf.': 0.91 To: comp-lang-python-announce@moderators.isc.org Date: Sat, 29 Jan 2011 15:27:26 +0100 From: Hartmut Goebel Organization: crazy-compilers.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20110106 Mandriva/3.1.7-0.1mdv2010.2 (2010.2) Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.python.announce,comp.lang.python Subject: [ANN] python-ghostscript 0.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 29 Jan 2011 19:26:40 +0100 X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Approved: python-announce-list@python.org Message-ID: Lines: 70 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1296325602 news.xs4all.nl 41102 [::ffff:82.94.164.166]:59614 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python.announce:1097 comp.lang.python:56163 Announcing: python-ghostscript 0.4 A Python-Interface to the Ghostscript C-API using ctypes :Copyright: GNU Public License v3 (GPLv3) :Author: Hartmut Goebel :Homepage: http://bitbucket.org/htgoebel/python-ghostscript :Download: http://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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Fixed bug: typo in function call name ctypes.util.find_library * (Unix) No longer try to load a specific version (version 8) of libgs.so * Added low-level interface for set_stdio() plus wrappers for file handles * (win32) Improved search for best Ghostscript installation: Consider Aladdin and GNU Ghostscript, too; Check for existence of DLL found in registry; take highest version available. * Added win32 example-batch file for testing and other improvements/fixes on examples an documentation. 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 |