[GRASS-dev] [GRASS GIS] #560: WinGRASS not deleting temp ppm files from map display

GRASS GIS trac at osgeo.org
Sat Aug 18 12:34:04 PDT 2012


#560: WinGRASS not deleting temp ppm files from map display
----------------------------------------+-----------------------------------
 Reporter:  isaacullah                  |       Owner:  grass-dev@…              
     Type:  defect                      |      Status:  new                      
 Priority:  critical                    |   Milestone:  6.4.2                    
Component:  Display                     |     Version:  6.4.0 RCs                
 Keywords:  v.digit ppm temp, wingrass  |    Platform:  MSWindows XP             
      Cpu:  x86-32                      |  
----------------------------------------+-----------------------------------

Comment(by wenzeslaus):

 Replying to [comment:11 glynn]:
 > Files which don't have this requirement should either use the OS'
 temporary directory, or a configurable directory. Access to the temporary
 directory may be significantly faster than to the mapset directory,
 particularly if the mapset is on a network filesystem.

 So, all files created for wxGUI are standard temporary files without
 special requirements and should be created by standard system/python way,
 is that rigth?

 Standard way is using
 [http://docs.python.org/library/tempfile.html#tempfile.mkstemp
 tempfile.mkstemp] and then delete the file (and of course, this has to be
 ensured even when error/exception occurs). Files which was not opened
 (files to be combined to resulting map) doesn't have to be closed. Only
 files which was opened (like resulting map) is necessary to close (see
 [http://www.logilab.org/blogentry/17873 this]).

 Now, mkstemp is used for files which will be combined to resulting and
 then os.remove (grass.try_remove) is called. So, I'm not sure where is the
 problem (why temporary files are not removed).

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/560#comment:12>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list