[GRASS-user] script in python

Gabriele Nolè gis.gn at libero.it
Mon Dec 1 09:55:27 EST 2008



Moritz Lennert-2 wrote:
> 
> On 01/12/08 15:23, Gabriele Nolè wrote:
>> Hi Jose.	
>> I changed the code by trying different solutions, such as:
>> ------------------------------------------------------------------------------------------
>> def main():
>> 	vect1 = options['vect_1']
>> 	vect2 = options['vect_2']
>> 	vect3 = options['vect_3']
>> 	
>>        
>> vbuffer=subprocess.Popen('v.buffer','input=vect_1','output=buffer_200m','buffer=200')
>> 	retcode=vbuffer.wait()  
>> 	 
>>       # Then I also tried with another command (v.db.addcol):
>>       #import subprocess
>>      
>> #vaddcol=subprocess.Popen('v.db.addcol','map=vect_1','columns=prova','VARCHAR(15)')
> 
> 
> The parameter for v.db.addcol is columns='prova varchar(15)'. I don't 
> think you can split that up into two parameters. Shouldn't this be:
> 
> vaddcol=subprocess.Popen('v.db.addcol','map=vect_1','columns=prova 
> VARCHAR(15)')
> 
> ?
> (don't know if the white space is allowed as such or whether you need to 
> quote the entire parameter as "prova VARCHAR(15)")
> 
> Moritz
> 
	
Yes, I have tried in this way but not right (with 'columns=prova
VARCHAR(15)').
Now I have also tried to remove white space but ... nothing

Thanks
Gabriele
-- 
View this message in context: http://www.nabble.com/script-in-python-tp20758838p20773446.html
Sent from the Grass - Users mailing list archive at Nabble.com.



More information about the grass-user mailing list