[GRASS-SVN] r32271 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 24 13:48:54 EDT 2008


Author: glynn
Date: 2008-07-24 13:48:54 -0400 (Thu, 24 Jul 2008)
New Revision: 32271

Modified:
   grass/trunk/lib/python/grass.py
Log:
Add pipe_command


Modified: grass/trunk/lib/python/grass.py
===================================================================
--- grass/trunk/lib/python/grass.py	2008-07-24 17:29:33 UTC (rev 32270)
+++ grass/trunk/lib/python/grass.py	2008-07-24 17:48:54 UTC (rev 32271)
@@ -50,9 +50,12 @@
     ps = start_command(*args, **kwargs)
     return ps.wait()
 
+def pipe_command(*args, **kwargs):
+    kwargs['stdout'] = subprocess.PIPE
+    return start_command(*args, **kwargs)
+
 def read_command(*args, **kwargs):
-    kwargs['stdout'] = subprocess.PIPE
-    ps = start_command(*args, **kwargs)
+    ps = pipe_command(*args, **kwargs)
     return ps.communicate()[0]
 
 # interface to g.message



More information about the grass-commit mailing list