[cairo-commit] pycairo/examples/cairo_snippets snippets_pdf.py, 1.4, 1.5

Steve Chaplin commit at pdx.freedesktop.org
Mon May 16 19:44:22 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/examples/cairo_snippets
In directory gabe:/tmp/cvs-serv23144/examples/cairo_snippets

Modified Files:
	snippets_pdf.py 
Log Message:
SC

Index: snippets_pdf.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets_pdf.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- snippets_pdf.py	16 May 2005 01:05:28 -0000	1.4
+++ snippets_pdf.py	17 May 2005 02:44:20 -0000	1.5
@@ -19,8 +19,8 @@
     if Verbose_mode:
         print 'processing %s' % snippet,
     
-    file_obj = file('snippets/%s.pdf' % snippet, 'wb')
-    surface = cairo.PDFSurface (file_obj, width, height)
+    filename = 'snippets/%s.pdf' % snippet
+    surface = cairo.PDFSurface (filename, width, height)
     cr = cairo.Context (surface)
 
     cr.save()
@@ -34,9 +34,6 @@
 
     cr.show_page()
     
-    surface.finish() # to finish using file object
-    file_obj.close()
-
     if Verbose_mode:
         print
 




More information about the cairo-commit mailing list