<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">Hi,</span></font><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; "><br></span></font></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">I wrote a small python script including the v.distance command:</span></font></div><div><font class="Apple-style-span" face="Arial"><br></font></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; "><br></span></font></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">grass.run_command(</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">"v.distance"</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">, flags=</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">'a'</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">, </span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">from</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">=fromLayer, to=toLayer, upload='</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">cat,</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">dist'</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">, column=</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">'</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">column1</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">,column2'</span></font><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">, table=tablename)</span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; "><br></span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">Running this command is resulting in a syntax error. I think it is because of the "from" but I couldn't figure out how to solve it. So, it would be great if someone could help me out.</span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; "><br></span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">Thanks,</span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; "><br></span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-size: 10pt; ">Schorschli</span></font></p></div>                                            <br /><hr />Bereits stolzer Besitzer einer @hotmail.CH Email-Adresse? <a href='https://signup.live.com/signup.aspx?mkt=de-ch&rollrs=12&lic=1' target='_new'>Hier prüfen ob Wunschadresse noch frei ist.</a></body>
</html>