[GRASS-SVN] r69113 - grass-addons/grass7/misc/m.printws

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 9 05:55:29 PDT 2016


Author: kuszinger
Date: 2016-08-09 05:55:29 -0700 (Tue, 09 Aug 2016)
New Revision: 69113

Modified:
   grass-addons/grass7/misc/m.printws/m.printws.py
Log:
Eliminating cairo driver auto created map.png file
in current directory



Modified: grass-addons/grass7/misc/m.printws/m.printws.py
===================================================================
--- grass-addons/grass7/misc/m.printws/m.printws.py	2016-08-09 11:59:10 UTC (rev 69112)
+++ grass-addons/grass7/misc/m.printws/m.printws.py	2016-08-09 12:55:29 UTC (rev 69113)
@@ -640,8 +640,13 @@
                               1], e=extents[2], n=extents[3])
             regionmode = 'window'
 
-        #setting GRASS rendering environment
+        # setting GRASS rendering environment
         
+        # dummy file name is defined since the following lines
+        # when switching on the cairo driver would create
+        # an empty map.png in the current directory
+        os.environ['GRASS_RENDER_FILE'] = os.path.join(TMPDIR, str(os.getpid(
+                    )) + '_DIS_' + str(00) + '_GEN_' + str(00) + '.png')
         os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
         os.environ['GRASS_RENDER_FILE_READ'] = 'TRUE'
         os.environ['GRASS_RENDER_TRANSPARENT'] = 'TRUE'



More information about the grass-commit mailing list