Using Ghostscript DLL via ctypes in Py2.3/Win

Discussion in 'Python' started by Adam Twardoch, Jul 6, 2005.

  1. I've written a simple commanline wrapper for calling GhostScript from
    Python. It uses os.system under Windows and os.popen under unixes. The call
    looks basically like this:

    gs -q -dNODISPLAY -dNOPAUSE -dSAFER ps2ai.ps infile.eps >outfile.ai

    I'd prefer to use the GhostScript DLL API* and call it using ctypes under
    Windows. This way, I could package just the DLL with my application and the
    user would not necessarily need to install the full GhostScript. However, I
    don't really know how to handle ctypes very well.

    Has anyone perhaps written something like that already and cares to share a
    code snippet?

    Regards,
    Adam

    *) http://www.cs.wisc.edu/~ghost/doc/cvs/API.htm
    Adam Twardoch, Jul 6, 2005
    #1
    1. Advertising

  2. Adam Twardoch

    Peter Hansen Guest

    Adam Twardoch wrote:
    > I'd prefer to use the GhostScript DLL API* and call it using ctypes under
    > Windows.
    > Has anyone perhaps written something like that already and cares to share a
    > code snippet?


    There is a ctypes mailing list where you might have more success getting
    a reply (though I suspect most people there read this forum as well).

    -Peter
    Peter Hansen, Jul 6, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Holger Joukl

    py2.1->py2.3.3 __getattr__ confusion

    Holger Joukl, Jul 2, 2004, in forum: Python
    Replies:
    1
    Views:
    299
    Peter Otten
    Jul 2, 2004
  2. Holger Joukl
    Replies:
    2
    Views:
    249
    Michael Hudson
    Jul 9, 2004
  3. Mike Brown

    unicode surrogates in py2.2/win

    Mike Brown, Mar 8, 2005, in forum: Python
    Replies:
    1
    Views:
    290
    =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?=
    Mar 8, 2005
  4. Josef Dalcolmo

    getmtime differs between Py2.5 and Py2.4

    Josef Dalcolmo, May 7, 2007, in forum: Python
    Replies:
    16
    Views:
    528
    Joe Salmeri
    Jun 1, 2007
  5. Krist
    Replies:
    6
    Views:
    724
    Arne Vajhøj
    May 7, 2010
Loading...

Share This Page