Difference: GsapiPython (2 vs. 3)

Revision 32020-07-07 - JulianSmith

Line: 1 to 1
 
META TOPICPARENT name="JulianSmith"

Python version of the gsapi API in ghostpdl:psi/iapi.h.

Line: 6 to 6
 
  • Use SWIG to wrap the functions declared in ghostpdl:psi/iapi.h. This done by ghostpdl:toolbin/gsapiwrap.py. This hasn't been entirely succesfull - SWIG is surprisingly limited at dealing with APIs that use (argc, argv) parameters, out-parameters and function pointers. So we end up with lots of manipulation in the SWIG .i file, plus custom front end (e.g. Python or C#) code to make things work.
Changed:
<
<
  • Use python ctypes. This works pretty well. See ghostpdl:toolbin/gsapi.py, a self-contained python module that, as of 2020-Jun-29, provides all of the ghostpdl:psi/iapi.h API except for gsapi_add_fs() or gsapi_remove_fs(). The drawback here is that it is specific to python - equivalent code would have to be written for each front-end language that is required.
>
>
  • Use python ctypes. This works pretty well. See ghostpdl:demos/python/gsapi.py, a self-contained python module that, as of 2020-Jun-29, provides all of the ghostpdl:psi/iapi.h API except for gsapi_add_fs() or gsapi_remove_fs(). The drawback here is that it is specific to python - equivalent code would have to be written for each front-end language that is required.
 
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 2014 Artifex Software Inc