[GRASS-SVN] r54921 - grass/trunk/gui/wxpython/psmap

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 5 04:53:51 PST 2013


Author: annakrat
Date: 2013-02-05 04:53:51 -0800 (Tue, 05 Feb 2013)
New Revision: 54921

Modified:
   grass/trunk/gui/wxpython/psmap/frame.py
Log:
wxGUI: attempt to fix #1554

Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py	2013-02-05 12:32:22 UTC (rev 54920)
+++ grass/trunk/gui/wxpython/psmap/frame.py	2013-02-05 12:53:51 UTC (rev 54921)
@@ -317,7 +317,8 @@
 
                 # hack for Windows, change method for loading EPS
                 if sys.platform == 'win32':
-                    im.load = loadPSForWindows(im)
+                    import types
+                    im.load = types.MethodType(loadPSForWindows, im)
                 im.save(self.imgName, format = 'PNG')
                 
             except IOError, e:
@@ -2188,7 +2189,7 @@
 
     import tempfile, os
 
-    file = tempfile.mktemp()
+    file = tempfile.mkstemp()[1]
 
     # Build ghostscript command - for Windows
     command = ["gswin32c",
@@ -2217,7 +2218,8 @@
         status = gs.close()
         if status:
             raise IOError("gs failed (status %d)" % status)
-        im = Image.core.open_ppm(file)
+        im = PILImage.core.open_ppm(file)
+
     finally:
         try: os.unlink(file)
         except: pass



More information about the grass-commit mailing list