Using Ghostscript DLL via ctypes in Py2.3/Win

A

Adam Twardoch

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
 
P

Peter Hansen

Adam said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top