[GRASS-user] script by bash to Python

Gabriele N. gis.gn at libero.it
Tue Sep 23 17:42:20 EDT 2008


Hy Glynn.
Ah ... I work on ubuntu 8.04.

But what could be the commands in the script that GRASS not 'recognize'?

Compared to version 63 with the 64 now run more scripts (always bash). 
All the scripts still work well in tcltk.

?
Thanks
Gabriele



Glynn Clements wrote:
> 
> 
> Gabriele N. wrote:
> 
>> >> I use grass63 with wxpython and I do not know how to use some scripts
>> >> that I
>> >> have in bash. The graphical interface opens but when I try to launch
>> the
>> >> script I get the following error:
>> >> GRASS 6.3.0 (gb2):~ > v.topo_5
>> >> $ v.topo_5 percorso=/home/gab/prova.shp nome_vett=foglio num=3
>> >> campo=foglio
>> >> Traceback (most recent call last):
>> >>  File "/usr/lib/grass/etc/wxpython/gui_modules/menuform.py", line 763,
>> in
>> >> OnRun
>> >>    self.goutput.RunCmd(cmd)
>> >>  File "/usr/lib/grass/etc/wxpython/gui_modules/goutput.py", line 209,
>> in
>> >> RunCmd
>> >>    generalCmd = subprocess.Popen(cmdlist,
>> >> NameError: global name 'subprocess' is not defined
>> >>
>> >> If I run the script with grass -tcltk works well.
>> > 
>> > Upgrading to grass64 (devbr6) should fix it.
>> 	
>> I speak again of this post. With grass64 svn the situation has improved.
>> Some scripts in bash run well and others do not.
>> But I do not understand  what are the differences between a script that
>> works and a script that does not work. I do not see the differences.
> 
> The above error is due to a bug in 6.3.0. The bug is only triggered
> when running a command which isn't recognised as a GRASS command. 
> Recognised commands are those corresponding to files in the bin,
> scripts and etc/gui/scripts directories, with any .exe or .bat
> extension removed.
> 
> It's also possible that individual scripts have bugs which are
> specific to Windows. GRASS probably doesn't get a fraction of the
> testing on Windows that it does on Linux and MacOSX.
> 
> -- 
> Glynn Clements <glynn a gclements.plus.com>
> _______________________________________________
> grass-user mailing list
> grass-user a lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 

-- 
View this message in context: http://www.nabble.com/script-by-bash-to-Python-tp18292175p19637676.html
Sent from the Grass - Users mailing list archive at Nabble.com.



More information about the grass-user mailing list