Marek Kubica committed deb8ada

Added documentation to GSut

  • Participants
  • Parent commits 8a6bdee

Comments (0)

Files changed (1)

 import gsu
 def std_stream_handler(f):
+    """A decorator that wraps the stream handler functions into the apropriate
+    ctypes function callback types"""
     return libgs.c_stdstream_t(f)
 class GhostScriptInterpreter(object):
+    """A high level interface for Ghostscript. To push words, you only have
+    to call methods on the object"""
     def __init__(self):
         gs = libgs.gsapi_new_instance()
-        libgs.gsapi_init_with_args(gs, ['gs'])
+        libgs.gsapi_init_with_args(gs, [
+                    # doesn't matter that much, we use the default name
+                    'gs',
+                    # quiet out copyright messages and stuff
+                    '-q'
+                ])
         libgs.gsapi_set_stdio(gs, self._stdin_handler, self._stdout_handler,
+        # save for later use
         self._instance = gs