[GRASS-SVN] r45997 - grass-addons/gui/wxpython/wx.psmap/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 16 04:53:11 EDT 2011


Author: martinl
Date: 2011-04-16 01:53:10 -0700 (Sat, 16 Apr 2011)
New Revision: 45997

Modified:
   grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap.py
Log:
wx.psmap: replace subprocess.Popen by grass.Popen


Modified: grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap.py
===================================================================
--- grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap.py	2011-04-16 08:47:24 UTC (rev 45996)
+++ grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap.py	2011-04-16 08:53:10 UTC (rev 45997)
@@ -19,7 +19,6 @@
 
 import os
 import sys
-import subprocess
 import textwrap
 import Queue
 try:
@@ -353,9 +352,9 @@
     def OnPDFFile(self, event):
         """!Generate PDF from PS with ps2pdf if available"""
         try:
-            p = subprocess.Popen(["ps2pdf"], stderr = subprocess.PIPE)
+            p = grass.Popen(["ps2pdf"], stderr = grass.PIPE)
             p.stderr.close()
-
+        
         except OSError:
             GMessage(parent = self,
                     message = _("Program ps2pdf is not available. Please install it first to create PDF."))
@@ -425,8 +424,8 @@
         
         if event.userData['pdfname']:
             try:
-                proc = subprocess.Popen(['ps2pdf', '-dPDFSETTINGS=/prepress', '-r1200', 
-                                        event.userData['filename'], event.userData['pdfname']])
+                proc = grass.Popen(['ps2pdf', '-dPDFSETTINGS=/prepress', '-r1200', 
+                                    event.userData['filename'], event.userData['pdfname']])
                 
                 ret = proc.wait()                        
                 if ret > 0:



More information about the grass-commit mailing list