[GRASS-SVN] r66698 - grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.economic

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 1 22:31:43 PST 2015


Author: zarch
Date: 2015-11-01 22:31:43 -0800 (Sun, 01 Nov 2015)
New Revision: 66698

Modified:
   grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.economic/r.green.biomassfor.economic.py
Log:
r.green: Remove ipdb import and deprecate use of python string module, use string method

Modified: grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.economic/r.green.biomassfor.economic.py
===================================================================
--- grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.economic/r.green.biomassfor.economic.py	2015-11-02 06:29:27 UTC (rev 66697)
+++ grass-addons/grass7/raster/r.green/r.green.biomassfor/r.green.biomassfor.economic/r.green.biomassfor.economic.py	2015-11-02 06:31:43 UTC (rev 66698)
@@ -305,8 +305,6 @@
 import numpy as np
 
 
-import ipdb
-import string
 
 ow = overwrite()
 
@@ -317,7 +315,7 @@
 
     prf_yield = opts['field_prefix']
 
-    pricelist=string.split(opts['prices'],',')
+    pricelist=opts['prices'].split(',')
 
     run_command("g.remove", type="raster", flags="f", name="tot_roads")
     run_command("g.remove", type="raster", flags="f", name="tot_roads_neg")
@@ -498,7 +496,7 @@
 
     
 
-    # pricelist=string.split(opts['prices'],',') #convert the string in list of string
+    # pricelist=opts['prices'].split(',') #convert the string in list of string
 
 
     # for x in range(1,len(pricelist)+1):
@@ -511,7 +509,7 @@
     prices=''
 
     for wood in listwoods:
-        #ipdb.set_trace()
+        #import ipdb; ipdb.set_trace()
         woodprice=wood.split('=')
         where_cond=fieldprice+" like "+"'"+woodprice[0]+"'"
         run_command("v.to.rast",input=forest,output='forest_'+woodprice[0],use="attr", attrcolumn=yield_, where=where_cond)
@@ -525,7 +523,7 @@
     #prices = '+'.join(["vol_typ%dpix*%f" % (i+1, price) for i, price in enumerate(opts['prices'])])
     #prices = '+'.join([prf_yield+"_vol_typ%dpix*%f" % (i+1, float(price)) for i, price in enumerate(pricelist)])
 
-    #ipdb.set_trace()
+    #import ipdb; ipdb.set_trace()
 
     price_energy_woodchips=float(opts['price_energy_woodchips'])   
     



More information about the grass-commit mailing list